Problems debugging php

I'm trying to debug a php file that I'm from javascript.  I'm running 2.1.5, Windows7 x64, Xampp 1.7.4 & XDebug

My apache root is in c:\xampp\htdocs
Project is in c:\xampp\htdocs\js_debug_test

I started with the numbers/remote js debugging tutorial which steps through the debugger fine.

I added a php file which just assigns a value to a variable based on a $_POST element ( $testVar = $_POST['data'])
and assigns another couple vars $testVar2 = "wtf" & $testVar3 = 5....

index.html  & php_debug_test.php live in /js_debug_test
& js_debug_test.js lives in /js_debug_test/js

I have breakpoints set on every line of the php file but when I try to debug, it just blows through it without breaking.
In remote php debug I do have "break at first line" checked

I've tried zero config and remote (remote using pretty much the same mappings that worked for js debugging)

When I click "Start Listen PHP Debug Connections" it seems to connect (no errors & turns green)

My Xdebug in my php.ini is:

zend_extension = C:\xampp\php\ext\php_xdebug-2.1.2-5.3-vc6.dll
xdebug.remote_port = 9000

Comment actions Permalink

I deleted my Php remote debug servers and created a new server that at http://localhost on port 80 with Xdebug

Now, while remote debugging and stepping through  out of the javascript with  xmlhttp.send(testString), it opens a js file on the jetbrains server???!!!!

I can debug locally by right clicking on the php file in Phpstorm and selecting debug.  When I do this I know Xdebug is working because
it returns a message in Firefox (6.02) warning me about the undefined index in my php file because the js file is not setting $POST['data']

This getting really frustrating.  Since so many people run Xampp, it would really help if you distrbuted a test project or two with default servers and path mapping already setup for remote debugging using Xampp default install in Windows (localhost @ c:\xampp\htdocs)

Comment actions Permalink

removed dbl post

Comment actions Permalink

Hello scott b,

You don't need any run configurations for debugging PHP. Here is a step-by-step instruction for your case:

  1. Remove any servers from Project Settings | PHP | Servers
  2. Enable 'Start Listen PHP Debug Connections' button on toolbar
  3. Put a breakpoint in your php file
  4. Refresh a web page

And the result should be:

Will you get the same result?

Also please note that you set xdebug.remote_autostart=1. It means that debugger will try connect to IDE on every page. As alternative you can use debug bookmarklets and disable this option.

Thank you for feedback!

Comment actions Permalink

scott b,

Do you still have the issue?

Thank you for feedback!


Please sign in to leave a comment.