Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio remote debugging application hosted on Linux - unable to enumerate running instances of the CoreCLR in the specific process

I'm trying to debug remotely an application that's being hosted on Linux

"Debian GNU/Linux 8 (jessie)"

with

.NET Command Line Tools (2.1.500)

I'm connecting via Visual Studio via SSH

and I've tried both modes:

  • Managed .NET Core for Unix

  • Native (GDB)

Project has been compiled on Windows

dotnet publish --configuration Release -r linux-x64

and also

dotnet publish --configuration Debug -r linux-x64

and works perfectly fine, but for some reason I'm receiving:

Managed .NET Core for Unix:

Fail to attach to process: Unable to enumerate running instances of the CoreCLR in the specific process


And if that's relevant (probably not, because other people use Managed .NET Core for Unix for that)

Native (GDB): Unable to start debugging. Unable to estabilish a connection to GDB. Debug output may containt more information

debug information:

Starting unix command: 'gdb --interpreter=mi'
bash: gdb: command not found
gdb --interpreter=mi exited with code 127.

In Visual Studio process is listed as:

Process: MyProjectName

Title: /home/deploy/app/MyProjectName StartUpArgument

Anybody has an idea what can cause that?

You can see how people do that with Raspberry Pi here:

https://youtu.be/ySzTCl-H10w?t=955

like image 207
Joelty Avatar asked Dec 27 '18 14:12

Joelty


People also ask

How do I debug a remote app in Visual Studio?

Select Configure remote debugging to configure the firewall and start the remote debugger. When configuration is complete, the Remote Debugger window appears. The remote debugger is now waiting for a connection. Use the server name and port number shown to set the remote connection configuration in Visual Studio.

How do I enable debugging in Visual Studio code?

To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS Code. You can also use the keyboard shortcut Ctrl+Shift+D. The Run and Debug view displays all information related to running and debugging and has a top bar with debugging commands and configuration settings.


1 Answers

What ste

Step 1

enter image description here

Step 2

enter image description here

Step 3

enter image description here

Step 4

enter image description here

Step 5

enter image description here

like image 61
Mohamed Elrashid Avatar answered Sep 20 '22 13:09

Mohamed Elrashid