external-debugging-output

external-debugging-output is a built-in function in `C source code'.

(external-debugging-output CHARACTER)

Write CHARACTER to stderr.
You can call print while debugging emacs, and pass it this function
to make it write to the debugging output.