Subject: maxima debug feature? - or how to accomplish same
From: Raymond Toy
Date: Sun, 10 Oct 2010 21:08:46 -0400
On 10/10/10 3:32 PM, Konovalov, Vadim (Vadim)** CTR ** wrote:
>> The reason I say this is because you can run the Maxima package with
>> the Lisp reader on inside of, eg. SLIME. This is an Emacs mode that
>> gives you gdb-like features to step through code (more precisely, it
>> is similar to gdb-mode in Emacs).
> can you please advice,
> if I want to have a possibility to do step-by-step through code, should I compile Maxima with some special options?
To be able to step, you need to build maxima with a lisp that can do
stepping. I have to say that although I do use such a lisp, I've never
really used the stepping abilities. I find tracing functions is usually
good enough. If not, adding print (format) statements in the
appropriate places works fine, especially since I can just quickly
redefine the offending function or just reload the file.
YMMV, of course.
> i.e.
> (proclaim '(optimize (safety 0) (debug 4)))
>
The default optimization settings are usually a good tradeoff between
speed, safety, and debuggability. I've not usually had problems with
the default settings. (Besides, there's no such thing as debug 4, and
using safety 0 with debug 4 (3) is weird. I would do safety 3, debug 3,
but only when necessary.)
> so LISP could have symbols, etc, to be displayed?
>
> How this "debugging" mode turned on?
It's almost always available unless you have speed 3 and debug 0 and
safety 0.
If you're only familiar with C-like languages and debugging, then Lisp
is not like that. You need to rethink how things work.
People have given you good advice on how to proceed. Learn a little
lisp (from a book or online resources), study a small maxima problem to
learn how things work, and if you run into some issue, ask again. The
answers will be better focused and will help you progress faster.
Ray