export debug

Export debug() so server can write debug output to both stdout and
any REPL's.