[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: douglas@Think.COM
- Subject: Debugging functions
- From: Jim McDonald <email@example.com>
- Date: Fri, 2 Sep 88 18:14:36 PDT
- Cc: salem@Think.COM, lucites@Think.COM
- In-reply-to: douglas@Think.COM's message of Mon, 29 Aug 88 13:10:06 PDT <8808292010.AA05979@verdi.think.com>
One of the main ways I use (dbg:arg ..) in Symbolics land is to change the
value of an arg to get a program to continue. For example,
(setf (dbg:arg 3) 'foo).
Is this possible in Lucid land?
Yes. Use the :S option, e.g.:
-> :S FOO 3
to set (well, actually rebind) the local named FOO to 3
You also might want to use :I FOO, which will inspect the indicated
I just noticed that in LCL 3.0, the :S option is not mentioned when you
type ?, but does appear for :??. Some relevant lines:
... many elided lines ...
:I k Inspect local variable numbered k and set * to result.
:I k var2 Inspect as above but also set var2 to result.
:I var Inspect local variable named var and set * to result.
:I var var2 Inspect as above but also set var2 to result.
:L k Print local variable numbered k and set * to its value.
:L k var2 Print as above but also set var2 to the same value.
:L var Print local variable named var and set * to its value.
:L var var2 Print as above but also set var2 to the same value.
:S k exp Evaluate exp and store result in local variable numbered k.
:S var exp Evaluate exp and store result in local variable named var.
... more elided lines ...
The full list of options is strongly suggested reading if you do
more than occasional debugging. It mentions several useful features:
trap on exit, unwinding the stack, pretty-printing, obtaining a
signalled condition, returning multiple values, etc.