Has anyone else noticed this? I'd like to be able to stop anywhere in script rather than just first line. I'm using the zero config method.
It has to be your machine/code specific -- it works fine here on Windows 7 x64; xdebug 2.2.3 and PHP 5.4.19. What's your xdebug version?
Please note that xdebug is unable to break if breakpoint is set on certain lines (due to the way how PHP generates the byte code), e.g. multi--line variable/array definition; if statement with no braces etc. What kind of code you have there (breakpoints)?
In any case: "Run | Break at first line in PHP scripts" -- try turning it on/off few times. Sometimes it stuck (for unknown reason) and wrong status is displayed -- maybe (just maybe) it may affect your situation as well.
Thanks for the quick response.
I'm on xdebug 2.2.0. I'm on OSX 10.8.4 using mamp on PHP 5.4.4
I've just noticed it works on another project fine but the other one it will still only stop on the 1st line. I tried ticking and unticking the run option.
The lines are normal single decleration lines. If I comment the 1st line and put a breakpoint on the second it will stop there, ie they are 'stoppable' lines.
Well .. if it works in another project .. and it woks if first line is commented .. then it's possible that problem is in actual files. See if you can change anything about them (e.g. re-type first 2 line manually ... or maybe copy and paste back and then save -- things like that).
On another hand -- I recommend upgrading your xdebug. v2.2.0 is quite unstable (has some issues) -- minimal recommended version is 2.2.1 (latest stable is 2.2.3).
Can you please show what kind of lines they are (I'm curious about that -- why it behaves that way) -- screenshot is enough.
You can also try re-configuring this particular project from scratch (in case it's some kind of project settings issue):
Here's an update, I've spent a day battling with xdebug 2.3.3 compiling. It's very tricky with MAMP on OSX, there's loads of things missing and the compiler process refers to the original OSX version for files. So I eventually managed to compile the right version on a virtual machine with a fresh install of PHP.
So now I have 2.3.3 version running OK but I'm still only able to break on the 1st line. I closed the project in question and renamed the .idea folder to no avail. I've created a real simple script to demonstrate the issue. It's literally just this...
echo "1st line";
echo "2nd line";
I've now found 2 projects that I can break anywhere, it seems the difference with them is
A/ They have a name in the window drop down not a path,(why is that, I can't see a name setting anywhere)
B/ They use a different virtual host mapping pattern in my apache config.
Unfortunately I'm not a Mac user and have no way of testing/reproducing anything like that here.
Your description (the difference between projects: A) and B) ) does not give me any clues on what may be wrong and where (I'm using Windows 7 and IIS 7.5 here; but even back then when I've used Apache, it always worked for me (yeah, Windows for the win )).
Maybe somebody from dev/support team will be able to help you here. If you will not see any response from them within 2-3 days just create new ticket on Issue Tracker with as many details as possible.
The only other thing I may suggest right now is to try and collect debugger logs (but I do not really expect this to be very useful). 1) Logs need to be collected from both PhpStorm side as well as xdebug; 2) attemp to debug your code:
Well .. see if "File | Rename Project" will help here (I'm thinking -- maybe you gave some projects custom name .. and some where left as is).
BTW -- have you tried with re-configuring project from scratch (deleting .idea folder as I have suggested) ?
Yes I did try that and it didn't work. OK I've found some more out. Renaming the project didn't help
so it's not that.
if I move a project from one virtualhost to another it works, then I move it back to the original location and it stops working so it's something to do with the server name or virtual hosts.
The 1st one works and the second doesn't
so in my browser I'm using http://web.rimmel.common.commercial.hearst/debugtest.php (works)
I just found this, looked like it could of fixed but didn't http://stackoverflow.com/questions/9416505/xdebug-hangs-on-virtual-hosting-domains
I'll check the logs now
Wow I've had a break from this issue cus it was driving me nuts. Had a bit of time today, so I removed Mamp as I've conluded it doesn't play well with command line tools. I reinstalled PHP / Mysql using homebrew and got xdebug installed. The error still existed. So I was just filling in a youtrack with my log files at the ready and I notice some links appear as I was typing, specifically this one http://youtrack.jetbrains.com/issue/WI-18579
There's some underlying weirdness between apache, xdebug, finder, terminal and PHP storm when it comes to case sensitivity. I renamed all folders where any sites are hosted to lowercase using mv. I had to restart PHPstorm and boom I can now stop anywhere.
So to anyone using vhosts make sure all folders are lowercase, especially if your using 'Directory Name Interpolation'