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
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_handler=dbgp
xdebug.remote_autostart=1
请先登录再写评论。
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???!!!!
http://devnet.jetbrains.net/resources/scripts/gen/e3dacd3d3cec36a1d64ecc49c926fae3.js
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)
removed dbl post
Hello scott b,
You don't need any run configurations for debugging PHP. Here is a step-by-step instruction for your case:
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!
scott b,
Do you still have the issue?
Thank you for feedback!