microsoft / microsoft/vscode-cpptools

[Feature Request] Launch program with elevated privileges from non-elevated VS Code

Open
#2,891 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

debugger Feature Request
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Debugger

I have a program that needs to run elevated. Currently, the only possible way to do this it to run VS Code itself elevated. This has some unfortunate side effects like not being able to drag and drop files onto the editor to open them any more.

Using compile settings to change UAC Execution Level highestAvailable or requireAdministrator both fail with Unknown Error: 0x800702e4. (In the case of highestAvailable this seems like a bug.) The same error occurs when setting the exe Compatibility properties to Run this program as an administrator.

Can we get an option to request elevation on a launch task without required VS Code itself to be elevated? This appears to possible on Windows.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the debugger launch-task handling and the existing UAC behavior described for Windows. Reproduce the 0x800702e4 failure with highestAvailable and requireAdministrator, then define what a successful elevated launch from a non-elevated VS Code instance should demonstrate.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools, operating-systems, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.