mit-scheme-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using the MIT Scheme debugger, a few questions


From: Nicholas Papadonis
Subject: Using the MIT Scheme debugger, a few questions
Date: Tue, 17 Mar 2020 19:11:01 -0400

I'm transitioning from an imperative development environment and could use some guidance.  I understand in MIT Scheme how to place a break points, trace entry/exits and examine the environment.

Is it possible to single step through the evaluation of subproblems? 

So far, I've discovered placing a break point on function entry and exit can be accomplished.  (debug) entered.  However using u/d b/f I'm already at the newest subproblem and this is the function where I set the break.  Can it be evaluated further?  Is it possible to watch certain arguments and break on a condition?

Thanks!

(pp f)
(named-lambda (f l c)
  (let ((a 1))
    (if (null? l)
        c
        (f (cdr l) (+ c 1)))))

(f '(1 2 3) 0)
[Entering #[compound-procedure 19 f]
    Args: (1 2 3)
          0]
;Breakpoint on entry
;To continue, call RESTART with an option number:
; (RESTART 4) => Continue from breakpoint.
; (RESTART 3) => Continue with advised procedure.
; (RESTART 2) => Return a value from the advised procedure.
; (RESTART 1) => Return to read-eval-print level 1.

(debug)
There are 14 subproblems on the stack.

Subproblem level: 0 (this is the lowest subproblem level)
Compiled code _expression_ (from stack):
    (let ((value ###))
      (repl-history/record! (%record-ref (cmdl/state repl) 5) value)
      value)
 subproblem being executed (marked by ###):
    (hook/repl-eval s-_expression_ environment repl)
Environment created by the procedure: %REPL-EVAL

 applied to: ((f (quote (1 2 3)) 0) #[environment 17] #[cmdl 18])
There is no execution history for this subproblem.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]