From: Renaud Pons
Subject: I need a tool to step (debug) a function with cmucl
Date: 
Message-ID: <ttdvgps0zol.fsf@laas.fr>
Hi,

I am looking for a tool to debug a function step by step with
cmucl-18b. I would like to evaluate each form of the function one
after the other with the possibility to watch each argument of these
forms (like it is done in gdb for C, or Edebug for Emacs-lisp). I
tried to use cmucl debugger but it's difficult for me and takes a long
time (edit code, insert "break", compile, run, hitting "step" hundreds
of time...)

Thanks a lot.
-- 
Renaud
From: Pierre R. Mai
Subject: Re: I need a tool to step (debug) a function with cmucl
Date: 
Message-ID: <87y9unab87.fsf@orion.bln.pmsf.de>
Renaud Pons <·····@laas.fr> writes:

> forms (like it is done in gdb for C, or Edebug for Emacs-lisp). I
> tried to use cmucl debugger but it's difficult for me and takes a long
> time (edit code, insert "break", compile, run, hitting "step" hundreds
> of time...)

You usually don't need to insert the break by hand, but can use the
extended trace facility instead:

(defun myfun ....)

(trace myfun :break t)

Indeed you can insert all kinds of conditional breakpoints using this
facility, at the beginning, end or both of a function.  Try a

(describe 'trace)

sometime (or see the cmu-user manual).

So this should reduce your work to running your code and hitting step
hundreds of times.  Instead of typing step, you can always let Emacs
do the work instead.

There are also some more fancy debugger packages out there (IIRC then
at least one of them comes bundled with ILISP nowadays), but I'll let
others comment on them, since I've never had much use for
single-stepping in any language I've used, or to put it another way:
Once I resort to single-stepping through code, I'm usually very
desperate, and no amount of user-interface stuff will help me.  That's
the time to take a break, do something else, return and find the bug
in a totally different module with a little hard thinking.

Regs, Pierre.

-- 
Pierre R. Mai <····@acm.org>                    http://www.pmsf.de/pmai/
 The most likely way for the world to be destroyed, most experts agree,
 is by accident. That's where we come in; we're computer professionals.
 We cause accidents.                           -- Nathaniel Borenstein