I am using a service called Snowflake (a hosted analytic database service) and the CLI tools to interact with the service launch a browser window in which I enter my authentication details. The return URL of that authentication request goes to localhost:<port>
where port is different each time.
This works fine except when I’m running in a VSCode devcontainer. The specified port is not open on the host so the attempt to return to it fails. I can solve this by manually forwarding the port in VSCode’s port forwarding view.
Its irritating though to have to manually add the port each time I use a CLI tool from inside my devcontainer. I’m aware that VSCode can automatically forward ports if it spots them (see https://github.com/microsoft/vscode/issues/143958) however thats not happening for me.
In Visual Studio Code I have remote.AutoForwardPorts
enabled.
Can anyone explain help me debug why ports are not being forwarded automatically?