On July 27, 2012, Raymond Toy wrote:
--------------------------------------
>If you want to see the lisp debugger, did you try what maxima suggested and
>(setf *debugger-hook* nil)?
>
>I notice, though, that I always run with maxima -g, and the lisp debugger
>is enabled, but when I to to_lisp() and run >fact as above, the lisp
>debugger is disabled. That seems not right.
----------------------------------------------------
Thanks for the cure. I just assumed the (Maxima) cgl default was to allow
break to initiate the debugger. (My windows version of the
standalone gcl initiates the lisp debugger without having to
reset a global flag.)
----------------------------------------------
MAXIMA> (setf *debugger-hook* nil)
NIL
MAXIMA> (defun fact (n)
(cond ((zerop n) (break "N is zero."))
(t (* n (fact (- n 1))))))
FACT
MAXIMA> (fact 3)
N is zero.
Fast links are on: do (use-fast-links nil) for debugging
Broken at COND. Type :H for Help.
1 (Continue) Return from BREAK.
2 Maxima top-level
3 (Abort) Return to top level.
dbl:MAXIMA>>:h
Break-loop Command Summary ([] indicates optional arg)
--------------------------
:bl [j] show local variables and their values, or segment of vs if
compiled
in j stack frames starting at the current one.
:bt [n] BACKTRACE [n steps]
:down [i] DOWN i frames (one if no i)
:env describe ENVIRONMENT of this stack frame (for interpreted).
:fr [n] show frame n
:loc [i] return i'th local of this frame if its function is compiled
(si::loc i)
:r RESUME (return from the current break loop).
:up [i] UP i frames (one if no i)
Example: print a bactrace of the last 4 frames
>>:bt 4
Note: (use-fast-links nil) makes all non system function calls
be recorded in the stack. (use-fast-links t) is the default
Low level commands:
------------------
:p [i] make current the i'th PREVIOUS frame (in list show by :b)
:n [i] make current the i'th NEXT frame (in list show by :b)
:go [ihs-index] make current the frame corresponding ihs-index
:m print the last break message.
:s show restarts.
:c show function of the current ihs frame.
:q [i] quit to top level
:r resume from this break loop.
:b full backtrace of all functions and special forms.
:bs [name] backward search for frame named 'name'
:fs [name] search for frame named 'name'
:vs [from] [to] Show value stack between FROM and TO
:ihs [from] [to] Show Invocation History Stack
:bds ['v1 'v2 ..]Show previous special bindings of v1, v2,.. or all if no v1
NIL
dbl:MAXIMA>>
--------------------------------------------
Ted