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




IDE side: Start an IDE side remote debugging server, so clients can connect to it.




start-ide-remote-debugging-server &key port socket-filter name log-stream => server-process



An integer or string.


A function of one argument or nil.


A string.


An output stream or nil.



A process handling incoming connections.


The function start-ide-remote-debugging-server starts a TCP server (by calling start-up-server) that creates IDE remote debugging connections.

port must be an integer port number or string service name. It is supplied as the service argument to start-up-server. port defaults to the value of *default-ide-remote-debugging-server-port*, which is 21101 initially.

name is used in the name of the created connections.

If log-stream is non-nil, LispWorks writes error messages to it relating to failures during communication on a connection. These failures should not happen normally, but may happen if something writes to the remote debugging connection not through the remote debugging interface. log-stream defaults to nil.

If socket-filter is non-nil, it is called with the connected socket before creating the connection, and if it returns nil then the socket is closed and no connection is created. socket-filter defaults to nil.

The server creates IDE remote debugging connections by calling create-ide-remote-debugging-connection with the connected socket, a name (constructed from name, the peer address of the socket and a counter) and log-stream.

start-ide-remote-debugging-server returns server-process, which is the first result of start-up-server. You can terminate the server by calling server-terminate with server-process.


The client would normally open a connection using configure-remote-debugging-spec with host specifying the machine on which start-ide-remote-debugging-server has been called with the same port as port (which defaults to the value of *default-ide-remote-debugging-server-port* for both functions).

The underlying TCP stream functionality must be working between the machines, that is they must be able to connect by TCP.

When using the Remote Debugger, Remote Listener or Inspector, you do not need to access the connection directly because the tools do it for you. In addition, create-ide-remote-debugging-connection remembers the connection, so all the IDE side functions that look for connections will find it.

socket-filter can call get-socket-peer-address to check who is connecting. It can also be used just to log that a connection has been made, but must return t in this case.

You could easily implement your own version of start-ide-remote-debugging-server if needed using start-up-server and create-ide-remote-debugging-connection.

See also

Remote debugging

LispWorks User Guide and Reference Manual - 20 Sep 2017