On this page:
debug
debugm

25 Debugging

 (require unstable/debug)

This library is unstable; compatibility will not be maintained. See Unstable for more information.

(debug (f args ...))
(debug f args ...)
Produce debugging output for the application of f, including the values of args.

Examples:

  > (debug (+ 3 4 (* 5 6)))

  starting + (#<procedure:+>)

  arguments are:

   3: 3

   4: 4

   (* 5 6): 30

  + result was 37

  37

  > (debug + 1 2 3)

  starting + (#<procedure:+>)

  arguments are:

   1: 1

   2: 2

   3: 3

  + result was 6

  6

(debugm f args ...)
Produce debugging output for the application of f, but does not parse or print args. Suitable for use debugging macros.

Examples:

  > (debugm match (list 1 2 3)
      [(list x y z) (+ x y z)])

  starting match

  match result was 6

  6

  > (debugm + 1 2 3)

  starting +

  + result was 6

  6