a racket meta-language for debugging
Go to file
Alex Knauth b574e648d9 Only test on version 6.2 and up
because of a bug in local-require at other phase levels in earlier versions.
2015-10-11 18:28:18 -04:00
debug add debug meta-language 2015-10-11 14:39:12 -04:00
.gitignore add .gitignore 2015-10-11 14:09:59 -04:00
.travis.yml Only test on version 6.2 and up 2015-10-11 18:28:18 -04:00
info.rkt add debug meta-language 2015-10-11 14:39:12 -04:00
README.md Create README.md 2015-10-11 14:48:52 -04:00

debug

A meta-language for debugging, based on sugar/debug from mbutterick/sugar

To debug the value of an expression, simply put debug in front of the language at the top of the file (for instance #lang debug racket), and put #R, #RR or #RRR in front of the expression.

  • #R reports the value and returns it
  • #RR reports the value with a line number and returns it
  • #RRR reports the value with the file and line number, and returns it
#lang debug racket
#R(+ 1 2)

Shows the output:

(+ 1 2) = 3
3
#lang debug racket
(+ 1 2 #R(* 3 4))

Shows the output:

(* 3 4) = 12
15