12
$\begingroup$

I would like to stop the evaluation somehwere at a specifiy line in a notebook. Then I could for example check the state of some variables.

After that I would like to continue the evaluation from the position where it was stopped.

Is this possible without using the Debugger?

$\endgroup$
  • 1
    $\begingroup$ @Szabolcs Dialog[] is well-known. I use it often. Little known is Debug[ expr1; expr2; ... ], unfortunately it does not work in the Notebook interface, only in a terminal interface. $\endgroup$ – Rolf Mertig Mar 6 '17 at 18:34
12
$\begingroup$

Use Dialog[] to interrupt and Return[] to resume.

Tutorial is here:

See also:

$\endgroup$
  • 3
    $\begingroup$ If I'm not mistaken then the Debugger is implemented by using Dialog only that he has a sophisticated way of inserting the breakpoints into the box-structure and a lot of functions to inspect the current stack. But I'm not entirely sure. I believe at some point I investigated in this. $\endgroup$ – halirutan Mar 6 '17 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.