Please extract your code (you can alter it as you wish) into separate file (project) to make reproducible code example so it can be used for testing by devs.
I've tred to reproduce the issue with my simple code and my solution worked for me (no idea if you have tried my code or not). Maybe your case is different -- I have no code and cannot verify it.
Also -- what xdebug version do you use? Try updating to the latest version (2.2.2 is the latest one; 2.2.1 works for sure).
As you can see from the screenshot below, it works for me: The breakpoint on second foreach works (after adding curly braces, of course) -- I can step inside it (current execution line has blue background).
Breakpoint on first foreach will never be triggered using your example -- and it is NOT a bug (neither PhpStorm or xdebug)
Hi there,
That is xdebug issue: it cannot stop on some lines -- http://youtrack.jetbrains.com/issue/WI-2191
Here is a simple code -- similar to yours:
IDE will not stop (rather, xdebug will not issue breakpoint) on certain lines (like, on foreach line).
But it is very easy to fix: just add curly brackets {} where required:
Now it stops. MAGIC!
Not magic happend to me yet

i put everywhere bracks but it doesn't stop
Please extract your code (you can alter it as you wish) into separate file (project) to make reproducible code example so it can be used for testing by devs.
I've tred to reproduce the issue with my simple code and my solution worked for me (no idea if you have tried my code or not). Maybe your case is different -- I have no code and cannot verify it.
Also -- what xdebug version do you use? Try updating to the latest version (2.2.2 is the latest one; 2.2.1 works for sure).
try this

http://www.4shared.com/zip/BjXfQqTv/breakpoint.html
and it's my xdebug version
Please attach your file to the forum post.
The site where you have uploaded it asks for registration and I have no plans to register on some site just to download some random file.
here you are
Attachment(s):
breakpoint.zip
Thanks.
So ... from this example -- which foreach (I mean -- which breakpoint) does not work: first or second?
(Notice that I have added curly braces to both if/cycles).
this code is extract the previous screenshot
i put break point to first block (that has bracks)
should i put bracks for all codes before it ?
As you can see from the screenshot below, it works for me:

The breakpoint on second foreach works (after adding curly braces, of course) -- I can step inside it (current execution line has blue background).
Breakpoint on first foreach will never be triggered using your example -- and it is NOT a bug (neither PhpStorm or xdebug)
yes you are right
solved
i put break points on wrong statment