From 95dd3e9144329d7289f4f9b43bb8cd8ff413a719 Mon Sep 17 00:00:00 2001 From: Nick Trogh <1908215+ntrogh@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:37:12 +0100 Subject: [PATCH] Update run as admin instructions --- docs/setup/windows.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/setup/windows.md b/docs/setup/windows.md index 0c03add851..a715fe8d9f 100644 --- a/docs/setup/windows.md +++ b/docs/setup/windows.md @@ -106,7 +106,17 @@ Using the Registry Editor (regedit): ### Unable to run as admin when AppLocker is enabled -With the introduction of process sandboxing (discussed in this [blog post](https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox)) running as administrator is currently unsupported when AppLocker is configured due to a limitation of the runtime sandbox. If your work requires that you run VS Code from an elevated terminal, you can launch `code` with `--no-sandbox --disable-gpu-sandbox` as a workaround. +With the introduction of process sandboxing (discussed in this [blog post](https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox)) running as administrator is currently unsupported when AppLocker is configured due to a limitation of the runtime sandbox. + +If your work requires that you run VS Code from an elevated terminal: + +1. In VS Code, run the **Preferences: Configure Runtime Arguments** command in the Command Palette (`kb(workbench.action.showCommands)`) + + This command opens an `argv.json` file to configure runtime arguments for VS Code. You might see some default arguments there already. + +1. Add `"disable-chromium-sandbox": true` to the `argv.json` file. + +1. Restart VS Code. You should now be able to run VS Code in an elevated terminal. Subscribe to [issue #122951](https://github.com/microsoft/vscode/issues/122951) to receive updates.