question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

"remote.autoForwardPorts": false gets ignored

See original GitHub issue

Does this issue occur when all extensions are disabled?: I donā€™t know. If I disable all extensions, then I would remove ā€œRemote Developmentā€ as well and as a consequence I wouldnā€™t have a dev container and port forwarding is a moot point.

  • VS Code Version: 1.71.2 (user setup)
  • OS Version: Windows NT x64 10.0.22000

Steps to Reproduce:

  1. Use a dev container with no port mapping
  2. Start an express.js application listening at port 3000
  3. VS Code will forward port automatically even with the following settings in place (user, container, workspace, as well as devcontainer.json):
{
   // Prevent VS Code's automatic port forwarding
   "remote.autoForwardPorts": false,
   "remote.restoreForwardedPorts": false,
}

Iā€™ve tried four places, and yet VS Code keeps auto forwarding ports.

Where do I need to set this, so that VS Code stops auto forwarding ports?

Iā€™m likely to overlook something but I think this behavior is nasty. If port mapping is not correctly configured for a container, I want the environment to fail fast.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ManfredLangecommented, Nov 3, 2022

@alexr00 Iā€™ll try to find time this weekend to create a repro repo.

Meanwhile I just came across this item, which may potentially be related. https://github.com/microsoft/vscode/issues/156104 As this item has been just release with VS Code version 1.73.0, it is possible that the VS Code behavior Iā€™ve reported here does not longer occur.

0reactions
alexr00commented, Oct 24, 2022

Iā€™m still not able to reproduce the issue of a port still getting forwarded when "remote.autoForwardPorts": false,. Do you have a repo you can share with a setup that reproduces the problem for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why automatic port forwarding? How to prevent VS Code from ...
onAutoForward : A value of ignore means that this port should not be auto-forwarded at all. { "otherPortsAttributes": { "onAutoForward"Ā ...
Read more >
User and Workspace Settings - Visual Studio Code
User settings - Apply globally to all VS Code instances. Remote settings - Apply to a remote machine opened by a user. Workspace...
Read more >
"Fossies" - the Fresh Open Source Software Archive
autoForwardPorts '; 35 export const PORT_AUTO_SOURCE_SETTING = 'remote. ... number): T | undefined { 131 const initialAddress = map.get(makeAddress(host,Ā ...
Read more >
VScode setting.js配ē½®ļ¼ˆäŗŒļ¼‰ - ꎘ金
VScode配ē½®setting.js VSCodeēš„åŸŗęœ¬ä»‹ē»å…Øę‹¼ę˜ÆVisualStudioCode(ē®€ē§°VSCode)ę˜Æē”±å¾®č½Æē ”发ēš„äø€ę¬¾å…č“¹ć€å¼€ęŗēš„č·Ø平台代ē ē¼–č¾‘å™Ø.
Read more >
visual-studio-code - vscode settings pane is blank - TagMerge
columnSelection": false, // Controls if empty lines should be ignored with ... cursorWidth": 0, // Defines a default formatter which takes precedence overĀ ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found