-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report sockets opened by debugpy #1337
Comments
Send "debugpySockets" event with information about opened sockets when clients connect and whenever ports get opened or closed.
Send "debugpySockets" event with information about opened sockets when clients connect and whenever ports get opened or closed.
@paulacamargo25 {
"seq": 6,
"type": "event",
"event": "debugpySockets",
"body": {
"sockets": [
{
"host": "127.0.0.1",
"port": 63435,
"internal": false
},
{
"host": "127.0.0.1",
"port": 63437,
"internal": true
},
{
"host": "127.0.0.1",
"port": 63436,
"internal": true
}
]
}
} Thereafter, such events are sent whenever the adapter opens or closes a port, with the content of "sockets" updated accordingly. At any given moment, the only ports that should be forwarded are those that were present in the most recent such event with See #1404 for implementation. |
Send "debugpySockets" event with information about opened sockets when clients connect and whenever ports get opened or closed.
Send "debugpySockets" event with information about opened sockets when clients connect and whenever ports get opened or closed.
Send "debugpySockets" event with information about opened sockets when clients connect and whenever ports get opened or closed.
Hi I'm trying to implement a client side debug adapter and I'm having trouble handling debugpySockets event. Is it safe to ignore the event? And when you mention port forwarding do you mean that the client should also listen to ports marked with Thanks in advance!! |
It is safe to ignore that event; it is there in case you need that information. This applies more broadly to any custom debugpy events, since if it required special processing by the client, it would mean that clients that only speak standard DAP couldn't use it. "Forwarding" in the discussion above specifically pertains to VSCode port forwarding when doing remote debugging (e.g. in Docker containers) - in that case the part of the client that handles that will need to know which ports need to be forwarded from the container to VSCode so that the latter can attach to the debugger inside the container. If you're not doing anything like that you don't have to worry about it. If you are doing anything like that, the only ports that you need to care about are indeed those that are not "internal" - the ones that are "internal" are used for local IPC between debugpy components and debuggee, basically. The "internal" ones are there in case you need to know whether a port being opened is owned by debugpy regardless of how it is used. |
In order to implement the Port Attributes API. We need to know the port info that debugpy generates for the debugging process. You can send this as a log message that we can track and then disable port forwarding on those ports.
The text was updated successfully, but these errors were encountered: