Need Debugging help: PhpStorm 5.0.4, OSX, MAMP, Xdebug
Hi Everyone -
I'm having a heck of a time getting breakpoints to work.
I watched a video on Jetbrains TV, but it covered version 1 and I'm using Version 5.
Right at the point in the video where the guy debugged and hit a break point, mine flew by my break point, as if it's not even turned on.
My Environment is
OSX 10.8.2
PHPStorm 5.0.4
MAMP Pro
Xdebug
My PHP.ini looks like this:
[xdebug]
xdebug.default_enable = 1
xdebug.remote_enable = 1
xdebug.remote_autostart=1
zend_extension="/Applications/MAMP/bin/php/php5.3.14/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so"
Here are the screenshots of my settings - is there something I have missed?
Please sign in to leave a comment.
Hi Jack,
Also:
In any case -- here is some good article/manual covering your environment: 5 Step Tutorial: PHPStorm + MAMP PRO 2... -- check it to see what you may be missing.
Other links that can be useful:
Thanks Andriy for your quick reply!
It started working, but I'm not entirely sure what I did (I don't actually think I changed anything since making that post, though I did stop and restart PHP Storm once)
If I am understanding it right, there are 3 ways to debug.
I thought I had all the configuration stuff set according to the "Debug configuration" method - I'd hit the debug window in phpstorm and expect it to stop on my break point. but it didn't
If I am reading the docs right, in this conifg, it's not necessary to hit the phone icon button that turns on the zero configuration debugging when you're using the "debugging configuration".
I hit the phone icon and my drop down next to it has the config "EasyIftaWeb" from the screenshots and that seems to work.
So I'm able to get back to work now!
Thanks for your quick Saturday Night response and the links!
- Jack
1) You have xdebug.remote_autostart=1 -- this means that xdebug will attemp to connect to debug client (PhpStorm in our case) each time when php script gets executed (you may have noticed around 1 sec delay when your script gets executed and no debug actually done)
2) I suspect that when you invoke debug via Run/Debug configuration (which sends all required xdebug parameters in this case -- start_debug flag and debug-session_id) this may somehow conflict with autostart setting (for example -- maybe in this case PhpStorm may only accept xdebug connection with certain ID which gets generated when you execute Run/Debug configuration .. but then "lost" becaise of that setting -- taht's just my speculation on possible behind-the-scene behavior).
3) Because you turned that Auto-listen button green, debugger client has started listening for incoming xdebug sessions (with any ID IIRC), and this allowed you to actually debug.
Therefore -- I'd suggest choosing between two approaches -- either use Run/Debug configuration (for that set xdebug.remote_autostart=0) or use none at all (only Auto-listen button so you can debug any request at any moment).
Generally speaking (my personal experience) -- I would set xdebug.remote_autostart=0 (it's too intrusive for my liking when activated, especially when dealing with Ajax requests that got served by PHP) but still use Auto-listen method (as described in Zero-configuration article -- controlling debug session via Bookmarklet or browser extension) -- that's what I'm doing for browser-based debugging.