Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5970

How to remote debug with Visual Studio an app published to Ubuntu Server 22.04 VM?

$
0
0

I have a simple ASP.NET 8.0 MVC app published to a Hyper-V virtual machine with Ubuntu Server 22.04. The app is in /home/username/testapp. I published it using a tutorial with nginx. I then ran the app and tried to attach the remote debugger to the dotnet process.

When I attach, I get this error:

Error says Failed to launch debug adapter. Additional information may be available in the output window. Unable to find debugger script at '/home/username/.vs-debugger.

I found a solution to this error that requires me to create that .vs-debugger directory manually.

After that, attaching the debugger again results in another error:

Error says One or more errors occurred. One or more errors occurred. Failed to attach to process. The .Net Debugger has insufficient privileges to debug the process. To debug this process, vsdbg must be running with root permissions.

I tried this and this solution. Now, I don't get any errors thrown when I attach to the process. Visual Studio correctly goes into debug mode and the breakpoints look bounded (they are full in red color). However, when I navigate through the pages, the breakpoints are not hit.

How do I fix this issue?


Viewing all articles
Browse latest Browse all 5970

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>