All Manuals > LispWorks® User Guide and Reference Manual > 34 The DBG Package

ide-attach-remote-output-stream Function


IDE side: Create a stream on the client side (a "client stream") attached to an IDE side stream.




ide-attach-remote-output-stream stream &key connection => stream-remote-object

An output stream.
A remote object handle.

The function ide-attach-remote-output-stream creates an output stream on the client side which is attached to stream, such that any output written to the output stream on the client side is sent to the IDE side and written to stream. The returned stream-remote-object is a remote object handle corresponding to a client side output stream.

ide-attach-remote-output-stream must be called on the IDE side.

connection can be used to specify which connection to use. If connection is nil, then ide-find-remote-debugging-connection is called to find a connection. See ide-find-remote-debugging-connection for more details about finding a connection.

ide-attach-remote-output-stream returns the same stream-remote-object if it is called again for the same stream and connection.

stream-remote-object is returned on the IDE side, but must be used on the client side, so you need to pass it to the client, normally by one of ide-set-remote-symbol-value, ide-funcall-in-remote or ide-eval-form-in-remote. For example, you can call:


After this call, anything that is written to *my-log-stream* on the client side will appear in the background output in the IDE.


ide-funcall-in-remote and ide-eval-form-in-remote themselves use this mechanism to bind their output-stream around the evaluation/function call.

If there are any errors when writing to stream, they are reported to the log-stream of the IDE side connection (as specified by ide-connect-remote-debugging and start-ide-remote-debugging-server). Possible reasons for such errors are:

See also

3.7 Remote debugging

LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:32