previous up next     contents index
Next: Top-level Up: Menu Items Previous: Donkey's Preferences

Breakpoints

    The Breakpoints menu allows the user to choose the type of reductions  to stop at when stepping through an expression. For example, if the user chooses only Applications and steps through (fact 3) where fact is:

(define fact 
  (lambda (x)
    (if (= x 0)
       1
       (* x (fact (sub1 x))))))

he will see:

(fact 3)
tex2html_wrap_inline760 ( * 3 ( fact ( sub1 3 ) ) )
tex2html_wrap_inline760 ( * 3 ( * 2 ( fact ( sub1 2 ) ) ) )
tex2html_wrap_inline760 ( * 3 ( * 2 ( * 1 ( fact ( sub1 1 ) ) ) ) )
tex2html_wrap_inline760 6

If All is chosen, no other options may be chosen, and if any other options are chosen, All may not be chosen.

If you select one of these options while stepping or unstepping through history, you will resume normal stepping from this point. This is because you will not be stopping at the same points, and snapshots will need to be taken at the different granularity. Note that since you are no longer in history, you will see the state of the program as it is now, not as it was in history. For example, if one evaluates (define a (list 1 2 3)) and then steps through

  (begin
    (set-car! a 5)
    a)

and then chooses a menu item in Breakpoints after unstepping to

  (begin
    (set-car! (list 1 2 3) 5)
    a)

the expression will change to

  (begin
    (set-car! (list 5 2 3))
    a)

to reflect the current state. (In the current state, a is now (list 5 2 3), not (list 1 2 3)).