microsoft / microsoft/vscode-cpptools
Access Denied when attaching to administrator-run process
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Issue Type: Bug
Steps:
- Run VSCode as administrator from the start menu.
- Launch your process as administrator, without debugging.
- Use
"request": "attach"in yourlaunch.jsonto select and attach to your process.
This fails with the error message:
Unable to start debugging. Failed to attach to process: Access is denied.
Note this works in Visual Studio, which also automatically restarts itself if it detects you're not running with the required privileges to attach.
A simular issue was reported in the now-closed #2881.
Extension version: 1.2.0
VS Code version: Code 1.53.1 (5d424b828ada08e1eb9f95d6cb41120234ef57c7, 2021-02-08T23:29:42.785Z)
OS version: Windows_NT x64 10.0.18363
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-6800K CPU @ 3.40GHz (12 x 3398) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on protected_video_decode: unavailable_off rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 31.91GB (23.80GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using an administrator-run VS Code process, an administrator-run target process, and a launch.json attach request on Windows. Start by tracing the extension's attach flow and privilege handling; done means the documented administrator scenario can attach successfully or receives an appropriate elevation path. Check the related issue #2881 for prior context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100