Skip to content
Prev 49569 / 63424 Next

Unexpected behavior of debug() in step-wise mode

On 01/01/2015 9:49 AM, Radford Neal wrote:
That makes sense, and suggests a simple fix:  when evaluating an
expression typed by the user at the prompt, temporarily turn off the
debug flag on the environment.  I'll try this out, but the trouble with
changes to the debugger is that most changes are hard to test, since
they depend on user interaction.  It's very easy to make a change that
fixes one problem and causes another.
I'd rather not make that change.  In the example you give it makes
sense, but what about if you replace the 3 and 4 with more substantial
braced expressions?  Then I'd probably want to step into whichever block
got chosen.
between "if" as an expression and "if" as a statement.  In both cases it
needs to treat it as an expression with a value (because statement
values are returned as the value of functions or braced blocks).

Duncan Murdoch