vscode: Setting `NODE_UNC_HOST_ALLOWLIST` does not work

Steps:

  • make sure no security.allowedUNCHosts is configured
  • configure an environment variable NODE_UNC_HOST_ALLOWLIST to be localhost
  • restart Windows
  • run code --user-data-dir \\localhost\c$\Users\<name>\Desktop\some-empty-folder
  • VS Code should open fine
  • open a folder such as vscode
  • make sure extensions work (e.g. typescript) and you can change user settings

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 23 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Setting the hosts in the security settings did the trick! This also works in v1.78.2.

Thank you very much for your support 🥇

You will only have to configure NODE_UNC_HOST_ALLOWLIST in rare cases where a setting cannot be configured otherwise, for example when your VS Code application data directory is on a UNC drive. For most cases:

  • you can remove the variable
  • you open settings and find the Security entry
  • you add the 3 IP addresses as allowed host to the UNC host allow list

Can you wait for the 1.78.2 release later today and try again.