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

NextPrevUpTopContentsIndex

ide-attach-remote-output-stream

Function
Summary

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

Package

dbg

Signature

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

Arguments

stream

An output stream.

connection

An ide-remote-debugging or nil.

Values

stream-remote-object

A remote object handle.

Description

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:

(dbg:ide-set-remote-symbol-value 
 '*my-log-stream* 
 (dbg:ide-attach-remote-output-stream 
  mp:*background-standard-output*))

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

Notes

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

ide-find-remote-debugging-connection
Remote debugging


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex