How to continue debugging?
I am used to NuSphere's phpED and this is how i debug:
1. open main index.php in docroot
2. select to debug that file
3. this opens internal (to the IDE) browser and opens website in that browser
4. click any link within the site and any breakpoint i have set will be hit
5. i can now stop debugging and make edits to code
--- after this is where things don't seem to work in Storm
6. click any link and debugging continues
IE - the debugger is listening to this browser session
as best i can tell in Storm i need to restart a new debugger session to start debugging again (and then redo navigation to the page i was testing). I am sure this isn't right and there must be something i am missing - anyone know what i did wrong?
Please sign in to leave a comment.
Hi there,
How do you start debugging in PhpStorm?
If it's via Run/Debug Configuration (within the IDE) then it just adds the "debug me" parameter to the URL ... which AFAIK does not get carried out to the next page (as it's in current URL only).
You could use xdebug browser extension -- it works via cookies .. so such "debug me" flag is always present (until you remove it or it expires) and will survive page reload/form submission/link navigation and will also participate in ajax requests.
Alternative approaches:
As i said above, i start debugging by clicking DEBUG (little bug icon) inside the IDE.
Re: your suggestions:
1. browser extension - will check into this
2. config xdebug - seems like this would be awkward, but will to try it out - do you know setting required for this?
3. add code - not acceptable
thanks.
https://xdebug.org/docs/all_settings#remote_autostart
thanks, i will take a look.
The browser extension does seem like the way to go though; but it doesn't work. I added extension and i see green bug in address bar and i set ext option to phpStorm - but breakpoints are not hit. Is there possibly something i need to configure in Storm to make this work?
In general: https://confluence.jetbrains.com/display/PhpStorm/Zero-configuration+Web+Application+Debugging+with+Xdebug+and+PhpStorm
The key element here is "phone handle" icon -- it must be active -- IDE must be listening to incoming debug requests.
https://confluence.jetbrains.com/display/PhpStorm/Debugging+with+PhpStorm
ahhh.. the Phone icon.. yes, that's the missing piece. Thank you.