XDebug ignores breakpoints
Hello everyone.
I'm currently using a student evaluation license for PHPStorm and I've been in love with the software so far, but there's this problem which I can't figure out.
When I set a break point, setup a debug session and load the page which is being debugged, the break point is ignored and the typical mapping error is shown on the event log: "Debug session was finished without being paused".
I've been struggling with this for a while to no avail, so I'm hoping that someone here can shed some insight.
I'll talk a little bit about my environment.
As of now I'm using PHPStorm 2017.2.4 on a macOS High Sierra computer.
The machine running the code is an external server to which I have configured a remote tunnel so that every connection made to localhost:9000 (server-side) is forwarded to my Mac dev machine on port 9000. This is working as expected, because if I enable the "break at first line in PHP scripts" option it does indeed Work. This configuration exists because my university has a firewall that I cannot bypass.
The file that I am testing is composed of three consecutive calls to phpinfo(). I've set up break points on the three function calls.
My xdebug configuration is enabled per key ("PHPSTORM") and mapped to the server localhost:9000 port, which is forwarded to my dev box 9000 port —as explained before—. If I enable the "Break at first line in PHP scripts" the script stops, but if I hit "resume" the following break points are indeed ignored.
My web server is using php56 running as an Apache module.
This issue is the only one holding me back from buying a personal license for the product, as I'd like to have a good XDebug capable IDE, but so far I haven't been able to set it up.
I'd appreciate any help that you can give me.
Kind regards.
Please sign in to leave a comment.
Hi there,
This sounds like path mapping issue -- IDE does not know how to map remote file path to local one.
It can be setup at "Settings/Preferences | Languages & Frameworks | PHP | Servers"
Just in case: https://confluence.jetbrains.com/display/PhpStorm/Debugging+with+PhpStorm
Hi Andriy.
Doubleched and it seems to be working now. Many thanks to you.
I had to map the individual file for this to work. Is this necessary or should it work properly just by mapping the document root?
>I had to map the individual file for this to work. Is this necessary or should it work properly just by mapping the document root?
No need to map individual files. Mappings are inherited from the parent folder .. so single root mapping is enough (e.g. unless you also have symlinks inside etc).
Thanks for the clarification and all the help, Andriy. I'll double check that.