Debugging with Ajax Follow
I'm using PHP Storm 2.1.2 with Xdebug Helper for Chrome. My debugger works great but I can't figure out how to get it working with Ajax calls (break points never trigger). I've seen other people in the forums talk about using Ajax with debugging, but I'm not sure what settings I need to change to make this work. Can anyone give me some pointers on how to get Debugging to work with Ajax and XDebug?
Perhaps with Ajax calls the special key that is generated by my browser plugin is not present? If so, how would I remedy this?
Please sign in to leave a comment.
unfortunately, this will not really help you - but debugging of AJAX calls works for me without any special settings in Firefox and Chrome exactly the same and without problems... Just clicked the Debug-"Phone"-Button and used the "start xdebug session" bookmarklet.
Ok, I was able to get ajax debugging working with a simple page. I am going to have to figure out what is different between the simple test page I created and the more complex pages I was working on that didn't seem to work.
I did the simple test on my home computer (wamp / windows), so it may be some server settings that are different between home and work (mamp / mac). I will have to look into this some more.
i am normally using the debug for quite complex sites (CMS). Also the AJAX calls run through the whole framework. I have made the best experience (on Mac) using a lamp stack in a virtual machine. That works great and i am able to test under different conditions...
In order to debug any php application running on server you need:
1) Enable listening for incoming debugger connections in PhpStorm(just press button with handset on toolbar)
2) Activate 'Xdebug' debug session
The second requirement could be reached in two ways: using special cookie (http://xdebug.org/docs/remote#browser_session) or enable debugging on each request via 'xdebug.remote_autostart' configuration option (http://xdebug.org/docs/remote#remote_autostart)
Try to use 'xdebug.remote_autostart' configuration option.
Thank you for feedback!