Breakpoints won't trigger in debugger?
I just learned how to use the debugger in PhpStorm a few days ago and have found it to be a great help. Unfortunatley, it's no longer working. The only thing I changed is that I moved my PHP files above the web root. So my structure used to look like this:
/public_html/app
/public_html/index.php
And now it looks like this:
/app
/index.php
And I also have and index.php file here:
/public_html/index.php
But it just includes the file at /index.php
When I tried running the debugger for the first time after moving my scripts up a directory, a path mapping dialog came up. I don't know why PhpStorm couldn't find the index.php file, because it showed the correct path in the window. Anyways, I typed in the absolute path on the server (which was the exact same path it showed for the local path) and now breakpoints simply will not trigger.
Is the problem with the path mapping I entered? I've searched through the settings and online help, but cannot find a way to get back to the path mappings dialog.
请先登录再写评论。
Hi there,
Based on your description -- quite possible.
"Settings | PHP | Servers"
BTW: what is your OS and PhpStorm version used?
Thank you, I will try entering path mappings for various files and folders and see if it starts working.
I'm running Windows 7 and PhpStorm 7.1.3
Works ok on windows. Not on MAC. Tried the mappings suggestion. No luck. Downloaded latest EAP. Will try. Very frustrating. Ran through all xdebug set ups and can set and use break points in main IDE php file. Does not work in surrounding classes on MAC, Windows is fine.
jim
Hi FYI, same Windows setup as you. win 7 and Storm 7.1.3. xampp install php 5.5,11. Make sure to set your php location in the IDE.. You can have several versions. Run php info from browser to find php.ini! Quite a pain at times :)!
jim
again can debug ok on windows! not MAC. Very large PHP class lib used by IDE program to test.
Can also debug against my Laravel project on windows.
Thanks. I ended up setting the path to folder above public_html (even though what PhpStorm showed was already correct!) and it started working. I guess moving the files up a directory confused PhpStorm somehow.
Sorry reading in chunks. Also use namespace defs in place of includes...
Hi and Thanks! Where are you setting the path? Can you show your IDE steps please?
Andriy showed me that the paths can be set here: "Settings | PHP | Servers"
If you are getting the same error I was (regarding paths) then this might work for you. I just set the path for the folder above public_html and debugging started working again.