Issue
I have an application running on an Ubuntu instance in GCP. The program opens a server on port 80 so it has to be run as root.
I've setup my SSH connection successfully, but when I attempt to connect the process remotely I get the error:
Failed to attach to process: The .NET debugger has insufficient privileges to debug this process
I tried to start vsdbg
with sudo .vs-debugger/vs2022/vsdbg
, but I got the same error.
How can I attach to this process?
Solution
I found a workaround with a hack.
cd ~/.vs-debugger/vs2022/
mv vsdbg vsdbg.original
nano vsdbg
Copy this into that file:
#!/bin/bash
sudo ~/.vs-debugger/vs2022/vsdbg.original $@
Et voila.
Answered By - Ian Newson Answer Checked By - Marilyn (WPSolving Volunteer)