IDE side: Connect to a client remote debugging server.
dbg
ide-connect-remote-debugging host &key port timeout open-a-listener name log-stream ssl ipv6 => connection
host⇩ |
A string. |
port⇩ |
An integer. |
timeout⇩ |
A non-negative real or nil . |
open-a-listener⇩ |
A boolean. |
name⇩ |
A string. |
log-stream⇩ |
An output stream or nil . |
ssl⇩ | |
ipv6⇩ |
connection⇩ |
The function ide-connect-remote-debugging
attempts to open a TCP stream to the client machine named by host on port number port. If this is successful within timeout seconds, then create-ide-remote-debugging-connection is called with the new stream, log-stream and a name constructed from name, host and a counter to create and return connection.
port defaults to the value of *default-client-remote-debugging-server-port*, which is 21102 initially.
timeout defaults to nil
, which means waiting indefinitely (or until the operating system reports an error).
If open-a-listener is non-nil, ide-open-a-listener is called to open a Remote Listener. open-a-listener defaults to nil
.
If ssl is non-nil, then the connection is made using SSL. This is done by passing ssl as the ssl-ctx argument to open-tcp-stream. Note that if you want to configure the SSL options, you can supply a ssl-abstract-context object.
ipv6 is used when opening the TCP connection, and interpreted the same way as in open-tcp-stream.
The client machine (specified by host) must be accepting TCP connections on port number port, which would normally be done by calling start-client-remote-debugging-server. Normally you do not need to supply port because both start-client-remote-debugging-server and ide-connect-remote-debugging
default it to the value of *default-client-remote-debugging-server-port*.
It is possible to override the default value of port by configuring the service name lw-remote-debug-client
. On a machine where this service is registered, if port is not given then the registered value is used instead of *default-client-remote-debugging-server-port*.
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 make one 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.
You could easily implement your own version of ide-connect-remote-debugging
if needed using open-tcp-stream and create-ide-remote-debugging-connection.
The editor command Connect Remote Debugging calls ide-connect-remote-debugging
.
start-client-remote-debugging-server
open-tcp-stream
3.7 Remote debugging
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:32