(define *tty-port* #f) (define (init-tty-debug-output!) (call-with-values open-pty (lambda (input-port name) (set! *tty-port* (dup->outport input-port)) (set-port-buffering *tty-port* bufpol/none) name))) (define debug-message (lambda args (with-current-output-port* *tty-port* (lambda () (for-each display args) (newline)))))