[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*DEBUG-IO*



I wanted code to behave temporarily as if *debug-io* were the terminal.
Arguably, I should have done
 (let ((*terminal-io*  *debug-io*)
       (*standard-input* (make-synonym-stream '*terminal-io*)
       (*standard-output* (make-synonym-stream '*terminal-io*)
       ...)
   ...)
but if I had instead done 
 (let ((*standard-input* *debug-io*) (*standard-output* *debug-io*))
   ...)
then I would have been screwed up by code which inside my LET just did:
 (let ((*standard-input* (make-synonym-stream '*terminal-io*))
       (*standard-output* (make-synonym-stream '*terminal-io*)))
   ...)
which would have them writing on the first terminal (not my intention).
The whole point of my binding the window in the first place is that I
wanted to leave the main screen undisturbed during a debugging break.
If recursive breaks or whatever were permitted a way of realizing 
that I started off on the original window, I wouldn't get the effect
I wanted. This technique is highly useful in split-screen debugging of
graphics code.