LISP DEBUGGING OVERVIEW CMSC 471 -- FALL 2010 Thanks to Marie desJardins DEBUGGING COMMANDS: :h Print a list of available commands :a Abort to the next debug level :q Abort to the top level interpreter :e Print the last error message :i Inspect the last error message (can get to local variables etc.) :w Print the current stack frame :u Go up one stack frame (i.e., to the caller) :d Go down one stack frame (i.e., to the callee) :t Go to the top frame (top-level expression being evaluated) :b Go to the bottom (most recent) frame :bt List the stack from bottom to top :bt1 - :bt5 List the stack with varying levels of detail :fl Set the frame limit (how many frames to print in backtrace) :rt Return from the current frame (prompts for return values) :c Continue evaluation (if at a continuable error) :rd Re-evaluate the current stack frame STEPPING COMMANDS: (step EXPR) Single-step evaluation of EXPR :s Evaluate the current form in single step mode :n Step over a form (evaluate one form in batch mode) :o Step over a level (evaluate the rest of the current form up to the next return) :c Turn off single step mode and continue evaluation OTHER DEBUGGING FACILITIES: (inspect EXPR) Inspect an arbitrary list object (can "dive in" to examine components of a structured object) (trace FN-NAME) Trace a function (print information every time the function is invoked or returns) (untrace FN-NAME) Untrace a function (untrace) Untrace all functions (break) Go to a break level (continue by typing :c) (break FORMAT-STRING ARGS) Go to a break level and print a formatted message