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

岁酱吖の 提交于 2019-12-08 19:15:43

问题


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


回答1:


What ste

Step 1

Step 2

Step 3

Step 4

Step 5




回答2:


Apparently our stupidity is limitless

We've been running our app as a service but FROM OTHER USER ACCOUNT THAN WAS USED IN SSH

Connecting to process works properly, but for some reason

Breakpoint will not currently be hit. No symbols have been loaded for this document

edit:

Solution:

https://developercommunity.visualstudio.com/content/problem/97445/vs2017-the-breakpoint-will-not-currently-be-hit-no.html

I also checked:

Enable source link support

Fall back to git credential manager auth. for all source link requests

Enable source server support Enable just my code [OFF]



来源:https://stackoverflow.com/questions/53946525/visual-studio-remote-debugging-application-hosted-on-linux-unable-to-enumerate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!