Remote Debugging XDebug not breaking on breakpoints
I have been able to get things set up pretty much. The setup: running PhpStorm on a mac, running Apache/PHP on an Ubuntu VM. The site has friendly URLs with routing to construct the appropriate viewer class. I use Chrome with the XDebug Helper extension.
My settings:
[Zend]
zend_extension="/usr/lib/php5/20060613+lfs/xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_host = 10.1.1.102
xdebug.remote_autostart=0
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_mode=req
If I set the IDE to break on the first line, it says "<invalid frame>" in the debug call stack -- I see the HTTP headers in the var window... but it doesn't jump to any source and I can't step. If I turn off the "break on first line" it just ignores all breakpoints. I feel so close...
Any help is very much appreciated.
Paul
Please sign in to leave a comment.
As you perfectly aware this is work in progress and changes are possible on every new EAP build.
1) Settings | PHP | Debug -> Break at first line (for external connections) -- so it does not stop on first line every time
2) Settings | PHP | Debug Mappings -- set your mappings here (even if you are using Local deployment type)
No need to launch "debug" every time -- just turn debug listener on (an icon on toolbar with phone handle -- latest EAP build PS-100.36) and activate debugger session from browser (using your browser extension) -- it will accept any IDE key. In this way you can have multiple active debug sessions (can be useful to debug AJAX requests etc).
Hey Andriy,
I've just installed latest build 100.36. Now all the time it stops at the first line of the file set as "start URL" in the Run/Debug Configuration window, despite of the checkobox "break at first line". Is this new feature arrived with "debug listen" icon or i have wrong configuration again?
Thanks
Dmitry
There are 2 places where you can find "Break at first line" option (valid for the last 2 builds, in previous build 1st option was located at diff place):
1) Settings | PHP | Debug -> Break at first line (for external connections)
2) Run/Debug Configuration -> Debug tab -> Break at first line
1st is used for external connections on any script while 2nd only for that particular script when launched from PhpStorm. I may recommend clearing both of them -- right now I do not have any run/debug configuration at all -- works ok for me.
Yep. removed this one:
And now it works for both, run from PhpStorm and Listen mode.
Many thanks for your help Andriy!
Hello Paul,
Please report an issue to our bugtracker(http://youtrack.jetbrains.net/issues/WI) or create a separate thread for that.
About debugger issues.
Have you read the blogpost about PhpStorm 2.0 EAP build 100.36?
Hello Dmitriy,
It is a bug. Fixed. Thank you for feedback:)
Hello guys,
Just upldated to latest 102.18 version. (for some reason patch can't be installed from phpstorm. each time i need to download full build from the site). And i have troubles with debugging again. Few days ago i've purchased personal licinse and i can't work with IDE again :( Please advice...
I've used new configuration type PHP Web Aplication. Here is my settings:
Server run using denwer.
application located at z:\home\r89.adyax (its virtual drive created by denwer)
Please see screenshots for configurations of "Run/Debug configuration"
When i run dubug using icon(shift + F9) second after "debug configuration " it writes that IDE can't map local path.
Also another thing i've noticed... When i'm in debug mode and click few pages on the site, it creates lots of tabs in the debug window. see screenshot
Attachment(s):
multiple tabs.png
can't map.png
debug configuration.png
Hi Dmitry,
Can't see mappings on your screenshots -- can you expand the "Project Files" node ?
But .. if it was the same as on previous EAP build (I mean, if this config was working previously and you have not changed anything) then it should work fine anyway (it does for me).
You can also resolve mappings in this way: http://devnet.jetbrains.net/message/5281026#5281026
(If I'm not mistaken, in current EAP build it may be a bit broken -- changes are not applied immediately (you need to restart debugging session) -- WI-4549)
Thanks again Andriy! :)
Its not abvious that "path on server" is editable, when i select something in the file/directory column...
Now it works, but another thing is these tabs in the debug window, see screenshot. If this is one Debug Session, what for we have so much tabs there? I suppose its some requests, actually i even checked once, it request of the image. But why it doesn't use same tab for it? After few etarations of debug, i have more then 20 tabs.... :O
Regards
Dmitry
Attachment(s):
resolved.png
Another bug with debugging. ("bug with debugging" - horrible thing :) ) "Evaluate expression" window shows wrong info. see screenshot.
Attachment(s):
evaluate.png
I think it is a know issue -- maybe this one - WI-3250 (unsure). Anyway -- you should report non-related issues separately -- this thread is already way to big.
I do not know what sort of codebase (which framework etc) you do have there ... but maybe you are having multiple debug sessions simultaneously (for example: ajax requests, 404-handler (which may be routed in the same way as all other urls via index.php) etc.)
There is already a ticket for this issue/behaviour -- WI-4297.
How do you start/do debugging -- using Debug Configuration (started from PhpStorm) .. or by using browser extension/scriplet (external debug request) ?? I'm using the 2nd way and I only do see multiple debug tabs only if I set breakpoint in such include-everywhere script (like index.php) and I do have multiple simultaneous requests (file not found handler). May I suggest you to try the same (there are browser extensions for Firefox and Google Chrome -- just search for xdebug).
Hello Dmitry,
We already got the same feedback about this usability problem. This issue will be resolved for the next EAP.
Thank you for feedback!
Andriy,
I'm very appreciate you for your help!:)
Dmitry,
Please report a bug request - http://youtrack.jetbrains.net/issues/WI
Could you provide xdebug log as well? - http://xdebug.org/docs/remote (xdebug.remote_log)
I just downloaded the latest update: 102.18 and things are looking much better. I can debug, but I've found that when it stops on a break point, all of the "step into", "step over" etc buttons along the top of the debug panel are disabled. If I click to another one of the debug tabs that opened and then back, they enable. So it just seems like something isn't updating the enabled property properly. (Why do so many debug tabs keep opening? I end up with a bunch.)
(BTW: I solved the indexing slowness by adding about 50 directory excludes for things I never need to debug/edit... much faster now)
Paul
Hello Paul, This issue is already fixed. Fix will be available in forthcoming EAP. Thank you for feedback!
Oops... wrong 'reply' button!?
Hi Dmitry,
You mentioned not being able to apply patches and full reinstalls. I, too, had this situation. Here's what works for me under Window 7. I routinely run PhpStorm as a 'regular' application. When I get the update notice about a patch, I exit PhpStorm and go to my desktop icon (or your start/program menu item wherever you find it) and right-click to bring up the context pop-up menu and "Run as administrator." Now, when PhpStorm launches and notices the patch, I can say to go ahead and install it and all goes as expected. I then simply exit PhpStorm and relaunch as a 'regular' app/user.
Hope this helps in your case,
--DropaBalm.com Jambo--
Cedar Rapids, Iowa USA
===================
Oh, well. I am not nuts even the first time. I clicked the reply to Dmitry's note a way up this thread and the post editor showed that I was in fact replying to his note, I post and here it is... out of sync and out of context with the discussion. Something is akimbo on this forum I think.
Anyway... I hope Dmitry sees this reply as I believe the "Run as administrator" work-around for apply a patch will solve one of his issues.
--Jambo--
Thanks a lot! I will try with next release.