Jonathon McKitrick wrote:
> Since the debugger only breaks on exceptions (AFAIK), what approach can
> be used with the debugger when trying to find logic errors?
>
(break &optional format-string &rest format-args) will get you into the
debugger.
(assert <conditon> () &optional fmt$ &rest fmtargs) likewise if the
conditon fails.
(error....)
kt
On 2006-01-13, Jonathon McKitrick <···········@bigfoot.com> wrote:
> Since the debugger only breaks on exceptions (AFAIK), what approach can
> be used with the debugger when trying to find logic errors?
Last week in message ···············@individual.net Pascal Costanza
mentioned:
(defun log (string)
(when *debug*
(print string)))
(define-compiler-macro log (string)
(when *debug*
`(print ,string)))
in the macros over functions thread.
Michael
Jonathon McKitrick wrote:
> Since the debugger only breaks on exceptions (AFAIK), what approach can
> be used with the debugger when trying to find logic errors?
Long hard thought. Sorry. :-)
(But Kenny's right: ASSERT should probably be your first
port of call, and BREAK and ERROR are there if you need
them. And debugging output. Lots of debugging output.)
--
Gareth McCaughan
.sig under construc
On 2006-01-13 18:14:02 -0500, Gareth "Neo" McCaughan
<················@pobox.com>
said in response to Jonathon "Tank" McKitrick's question:
"Okay, So what do you need, besides a miracle?":
> debugging output. Lots of debugging output.
Don't miss Gareth in the soon-to-be-released sequel "The Backtrace
Restarted" coming soon to a common lisp theater near you!
;^)
Raffael Cavallaro wrote:
> On 2006-01-13 18:14:02 -0500, Gareth "Neo" McCaughan
> <················@pobox.com>
> said in response to Jonathon "Tank" McKitrick's question:
>
> "Okay, So what do you need, besides a miracle?":
>
>> debugging output. Lots of debugging output.
>
> Don't miss Gareth in the soon-to-be-released sequel "The Backtrace
> Restarted" coming soon to a common lisp theater near you!
>
> ;^)
Glad to see that someone caught the obvious reference :-).
--
Gareth McCaughan
.sig under construc
Jonathon McKitrick wrote:
> Since the debugger only breaks on exceptions (AFAIK), what approach can
> be used with the debugger when trying to find logic errors?
>
Automated unit testing. Your tests are a sort of contract regarding how
the code is supposed to behave. If your code doesn't satisfy your test
suite, then you have logic errors.
http://www.gigamonkeys.com/book/practical-building-a-unit-test-framework.html
Aloha,
David Sletten