tags:

views:

148

answers:

0

My mod_rewrite turns accounts/create into index.php?folder=accounts&action=create, but pdt ignores it, so when I try to start a PHP Script debug session, I have to type a folder location in the file field and pdt doesn't accept.

When PDT auto generates the URL for the PHP Web Page debug session, I go to http://localhost/myframe/index.php?XDEBUG%5FSESSION%5FSTART=ECLIPSE%5FDBGP&KEY=12569067976875, but myframe is in the frameworks folder, so I get a 404 error.

When I check a breakpoint, uncheck Auto Generate, add frameworks before myframe in URL, set Start Debug from http://localhost/frameworks/myframe/accounts/create in Advanced and click Debug, the debugger doesn't stop at the breakpoint.

UPDATE

Debugging as PHP Web Page without mod_rewrite is working. Debugging as PHP Web Page with mod_rewrite isn't working. I'm using the following configuration.

php.ini:
    zend_extension = "\xampp\php\ext\php_xdebug.dll"
    xdebug.idekey=ECLIPSE_XDEBUG
    xdebug.profiler_enable=1
    xdebug.remote_enable=1
    xdebug.remote_handler="dbgp"
    xdebug.remote_host="localhost"
    xdebug.remote_mode="req"
    xdebug.remote_port=9000

Start ->
    Control Panel ->
        Firewall ->
            Exceptions ->
                Add Port ->
                    Name:
                    XDebug

                    Port number:
                    9000

Window ->
    Preferences ->
        PHP ->
            Debug ->
                PHP Debugger:
                XDebug

                Server:
                localhost

                PHP Executables:
                C:\xampp\php\php-cgi.exe

Debug Configurations ->
    MyFrame Web Page ->
        Server ->
            PHP Server ->
                Configure ->
                    Server ->
                        Name:
                        localhost

                        Enter the URL that points to the document root of this server:
                        http://localhost/frameworks

                        Path Mapping ->
                            (serverpath) http://localhost/frameworks/myframe/index.php
                            to
                            (filesystem) C:\xampp\htdocs\frameworks\myframe\index.php

                            (serverpath) http://localhost/frameworks/myframe/index.php
                            to
                            (workspace) /myframe/index.php

            File:
            /myframe/index.php

            URL:
            http://localhost/ by the left
            frameworks/myframe/index.php by the right

        Advanced ->
            (checked) Open in Browser
            (checked) Debug All Pages


.htaccess:

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^([^/]*)/?([^/]*)/?([^/]*)$ index.php?folder=$1&action=$2&params=$3 [L]
</IfModule>