Breakpoints inside array declarations |
Site Admin
|
This is not a bug. Breakpoints work for lines that can be executed and only for them.
|
||||||||||||
_________________ The PHP IDE team |
Veteran
|
OK
But surely the line "element => $a + $b" can be executed? Allow me use two another example to illustrate the point:
Now what should I do to break at the calcb function, for example? I guess I could set a breakpoint in the calcb function itself, or check the array values after declaration. However, since the declaration may be long and complex, it would be nice to debug the array during declaration. |
||||||||||||||||||
|
|
As dmitri wrote it already, the debugger can break only on an executable line. Putting some more emphasis on line, the way you wrote your array declaration is breaking up one PHP line into many text lines. A PHP line ends with a semicolon and it does not matter if that line spans 20 lines in the editor or just one. From PHP and therefore the debuggers point of view your line looks like this:
Of course, you can break on a line in the calca or calcb function assuming that the functions have an executable line. The debugger doesn't break on comment lines either. Honestly, the IDE shouldn't allow one to set a breakpoint on those lines, but that is a different issue. |
||||||||||||||
|
Veteran
|
Aaaah, I get it now. Thanks for clarifying
|
||||||||||||
|
Breakpoints inside array declarations |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by