[plt-scheme] trace?

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Sat Aug 19 14:40:52 EDT 2006

Paul Graham wrote:
> Is there anything in mzscheme analogous to cl's trace function?
> How do you trace the execution of a function?  Thanks, --pg
(require (lib "trace.ss"))

(define (foo x)
  (printf "X = ~a\n" x))

(trace foo)

(foo 2)
(foo 9)

There is also errortrace which shows a nice stack trace when an error is
thrown. All thats required is to require it:

(require (lib "errortrace.ss" "errortrace"))

Posted on the users mailing list.