Question Details

No question body available.

Tags

c++ debugging permissions elevated-privileges attach-to-process

Answers (2)

Accepted Answer Available
Accepted Answer
July 9, 2026 Score: 7 Rep: 182,070 Quality: Expert Completeness: 20%

No, and that is very much by design. Any "workaround" that would enable this would have been fixed by Microsoft as a security leak decades ago.

One solution is indeed to simply run Visual Studio as administrator, for the purpose of debugging. You can still run Visual Studio as a regular user while developing.

Another solution, which you'll want for CI/CD purposes anyway, is to have test data. This test data will probably live in your git repository, so you don't need admin rights to access that. This means that the only debugging task for which you need admin rights is the actual access of the protected folders (which is of course unavoidable)

July 9, 2026 Score: 4 Rep: 281,335 Quality: Low Completeness: 10%

Use remote debugging.

This would work on a virtual machine, but it might be possible to make it work in a self-reflection mode.

The remote debugger runs in administrator mode. Visual studio debugging need not.

I haven't tried this in "self reflection" mode (connecting to the computer your debugger is on via remote debugging), but that might work. It would definitely work if you can put your admin computer in a vm on your machine, or a 2nd computer.