-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Original post: microsoft/vscode#115616 (comment)
In a remote environment (Codespaces, Dev Containers, etc.) VS Code will automatically detect and forward ports that it finds processes listening on so that users can access the remote application they're developing from their local machine. This includes debugees, such as a Python program that the user is debugging.
The auto port forwarding can't distinguish between a useful port to forward (ex. the app that you're debugging) and a useless port (ex. the port that the debugger itself uses for communication). This results in noisy extra ports being forwarded. We've seeing this in other extensions, such as the JS Debug extension.
The proposed solution for this is to allow extension to provide port attributes for ports that they know about. The JS Debug extension has done this for the debug ports it uses: https://github.com/microsoft/vscode-js-debug/blob/0d0704da3726653e2d806be528b8ab51fa952cf0/src/ui/portAttributesProvider.ts#L39-L55
We're working on finalizing the port attributes API, so I don't expect too many more changes. In support of finalizing the API, and to remove the port-clutter that comes from forwarding Python extension debug ports, it would be great if the Python extension adopted the proposed port attributes API.