Psd needs some runtime support in the Scheme environment. The command loop psd-debug is a closure containing state variables for the debugger. Procedure application needs the procedure psd-apply, and breakpoint support needs a global variable for storing the breakpoint locations.
The instrumentation code resides in the same Scheme environment as the debugged program. This is not strictly necessary, but it has proved to be a convenient way of working. For example, it is easy to cut down the size of the instrumented files by assigning a unique integer for each source file name and using it instead of the full path name.