connect#

debugpy.connect(
__endpoint: Tuple[str, int] | int,
*,
access_token: str | None = None,
) Tuple[str, int]#

Tells an existing debug adapter instance that is listening on the specified address to debug this process.

`__endpoint` must be either a (host, port) tuple as defined by the standard `socket` module for the `AF_INET` address family, or a port number. If only the port is specified, host is “127.0.0.1”.

`access_token` must be the same value that was passed to the adapter via the `–server-access-token` command-line switch.

This function does’t wait for a client to connect to the debug adapter that it connects to. Use `wait_for_client` to block execution until the client connects.