Racket Mode: user breakpoints with conditions and actions

Just a heads up that I merged an enhancement to the step debugger in Racket Mode.

Previously you had a "run to here" command, which you could think of as one, temporary, unconditional breakpoint at a time.

Now you can also set multiple, persistent breakpoints. Each has a condition (a Racket expression, which can refer to locals around the breakpoint) and a list of actions (any of break, print, log). The combination of the condition #t and the actions list (break) is a simple unconditional breakpoint. More details here.

Behind the scenes, this uses the same annotator as does the Dr Racket debugger. In other words, step debugging your program means it effectively rewrites your program into a "step-debug-able" version of your program.

8 Likes