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.
1 Answer
Reset to default 2Summarize 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
版权声明:本文标题:c# - Debug .NET Core on Ubuntu using SSH with attach to process not hit breakpoint - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744576174a2613638.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论