admin管理员组

文章数量:1395198

I write an ASP.NET Core app, copy the source code to Ubuntu and build it, then use dotnet command to run it. Then attach process by SSH in Visual Studio 2022, no errors appear, no information in the output of debug in vs, and the module is empty.

Breakpoint is not hit when I call the API, the stop debug button shows, but it works well in my local PC environment. The below screenshot shows that process info in Ubuntu and Debug state in vs.

It has pdb files because I build the source code in Ubuntu, vs-debugger already installed (the first screenshot shows vs-debugger/GetvsDbg.sh -v vs2022 -u)

I think the issue is the vs-debugger command /bin/sh /home/smodev/.vs-debugger/GetVsDbg.sh -v vs2022 -u -l /home/smodev/.vs-debugger/vs2022 -d vscode -a /remote_debugger and /home/smodev/.vs-debugger/vs2022/vsdbg --interpreter=vscode, it didn't communicate to visual studio.

I write an ASP.NET Core app, copy the source code to Ubuntu and build it, then use dotnet command to run it. Then attach process by SSH in Visual Studio 2022, no errors appear, no information in the output of debug in vs, and the module is empty.

Breakpoint is not hit when I call the API, the stop debug button shows, but it works well in my local PC environment. The below screenshot shows that process info in Ubuntu and Debug state in vs.

It has pdb files because I build the source code in Ubuntu, vs-debugger already installed (the first screenshot shows vs-debugger/GetvsDbg.sh -v vs2022 -u)

I think the issue is the vs-debugger command /bin/sh /home/smodev/.vs-debugger/GetVsDbg.sh -v vs2022 -u -l /home/smodev/.vs-debugger/vs2022 -d vscode -a /remote_debugger and /home/smodev/.vs-debugger/vs2022/vsdbg --interpreter=vscode, it didn't communicate to visual studio.

Share Improve this question edited Mar 17 at 8:30 oudi asked Mar 17 at 7:04 oudioudi 6775 silver badges13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Summarize the issue:

OP has verified the issue is related to the vs2022 in his machine.

Suggestion

Upgrade the vs2022 to the latest version.


Please refer this official document: Debug .NET Core on Linux using SSH by attaching to a process first.

And I am not using vs-debugger.

Please make sure again that all files and contents of the two projects are the same. You can copy the project in Windows and transfer it to the Ubuntu machine by using WinSCP.

Test Steps

In addition, please confirm whether the URL address you visited is correct and whether this method is not triggered.

本文标签: cDebug NET Core on Ubuntu using SSH with attach to process not hit breakpointStack Overflow