It "pauses" on the beginning of a statement. elsif is not the beginning of a statement.
Is that DWIM? What behavior do we want?
I expect that it will at least pause on the evaluation of interesting conditionals [elsif (0) being an example of an uninteresting one]
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] [d/l] [select] |
| [reply] |
Any chance of getting a nice little discussion about this decision, or a point to the design discussion? The historian in me is looking for new material.
-QM
--
There are only 11 people in the world. Those who understand unary, and those who don't.
| [reply] |
Of course, the Right Place to put the breakpoints is on the code *inside* the if/elsif/else - "right" being "you will actually stop somewhere near where you want to be".
I've noticed similar annoying behavior with for loops at times. Just set your breakpoints inside and the problem goes away.
This is the least intrusive solution; obviously, you can code to the debugger's limitations by doing things like
if ($cond1) {
...
}
else {
if ($cond2) {
...
}
else {
if ($cond3) {
..
}
}
}
and now you can break at every if. (That looks scarily like some of my old PL/1 programs...) | [reply] [d/l] |
I started to say
If I have a long if/elsif/elsif/... chain, then setting breakpoints inside every block is painful (especially when repeating the same breakpoints while doing the debug/edit loop).
However, more than 3 is a good indicator I'm doing something wrong, and should rethink my attack.
-QM
--
Quantum Mechanics: The dreams stuff is made of
| [reply] [d/l] |