debugging.scm 692 B

123456789101112131415161718192021222324252627282930313233
  1. ; Part of Scheme 48 1.9. See file COPYING for notices and license.
  2. ; Authors: David Frese
  3. ;; Debugging code
  4. ;; To activate/deactivate it, the flag 'debug-mode?' must be set.
  5. ;; To see all the debugging infos:
  6. ;; set the the flag 'debug-mode?' to #t
  7. ;; and remake the GC
  8. ;; make compile-twospace-gc or make compile-bibop-gc
  9. ;; make scheme48vm
  10. ;; make
  11. ;; and ./go
  12. ;; Debugging
  13. (define debug-mode? #f)
  14. ;; expr is a string
  15. (define (debug expr)
  16. (if debug-mode? (display-message expr)))
  17. ;; expr is an integer
  18. (define (debug-int expr)
  19. (if debug-mode? (display-integer expr)))
  20. ;;just a line
  21. (define (debug-line)
  22. (if debug-mode?
  23. (display-message "----------------------")))