Skip to content

Add API for forwarding arbitrary ports when running remotely (without spawning browser) #74258

@DanTup

Description

@DanTup

Apologies if an issue for this exists, but I couldn't find one. I know there are many ways of mapping ports, but I don't believe any allow an extension to just map an arbitrary port.

Here's my use case:

  • User starts debugging an app. This includes running a debugger bound to port x (it does not get mapped or opened in the browser, it's currently just connected to by my debug adapter)
  • User launches DevTools - this is a companion web app that provides some debugging tools that can't easily be built inside VS Code, nor work well inside a web view. These tools require a connection to the VM being debugged from the browser (we use a web socket).

DevTools runs a small HTTP server which listens on port y which we open in the browser - this works fine with openExternal. However, DevTools needs to connect back to the VM debugger service running on port x (it's a client-side application, so the connection is made from the code running inside the browser).

What we need to be able to do is asking VS Code to forward port x, then pass that port number in the querystring when we launch DevTools with openExternal.

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)feature-requestRequest for new features or functionalityremoteRemote system operations issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions