Visual Studio debugging C# on Linux: Breakpoints not visible despite successful process attachment - Stack Overflow

I'm having an issue with remote debugging a C# application on a Linux server from Visual Studio. D

I'm having an issue with remote debugging a C# application on a Linux server from Visual Studio. Despite being able to attach to the process, my breakpoints are not being hit, or more specifically - the app seems to stop at breakpoints (it doesn't continue execution), but I don't see the yellow highlight in the code and can't step through the code with F10/F11.

Environment:

  • Visual Studio on Windows (recently upgraded)
  • Remote Linux server
  • C# Console application (.NET 6)
  • Multiple referenced DLL libraries
  • New laptop (problems started when I began using it)

Application structure:

  • My solution consists of a Console App project which I can successfully attach to
  • This Console App references several DLL libraries from other projects in a different solution
  • When debugging, I'm trying to step into functions in these referenced DLLs using F11

What happens:

  1. I can successfully attach to the process on the Linux server
  2. I set breakpoints in my code
  3. The application appears to stop when it reaches a breakpoint (execution pauses)
  4. However, I don't see the yellow highlight in the editor, and I don't have debugging controls (can't step through)
  5. The Call Stack and Threads windows remain empty
  6. The only window showing any information is Output, which shows modules being loaded

Important note:

  • Problems started immediately after switching to a new laptop
  • Other team members can successfully attach to and debug my application from their machines
  • This indicates the issue is specific to my development environment, not the code or the server

What I've tried:

  • Ensuring Debug symbols are set to "Full Symbols" for all projects
  • Setting DebugType to "portable" in the .csproj files
  • Disabling optimization in Debug configuration
  • Installing a fresh version of vsdbg on the Linux server
  • Adding <DebugSymbols>true</DebugSymbols> and <EmbedAllSources>true</EmbedAllSources> to my .csproj files
  • Changing Symbol settings in VS Options to load all modules
  • Extensively modified configurations in Tools > Options > Debugging:
    • Tried enabling/disabling "Just My Code"
    • Modified Symbol loading settings
    • Changed various debugger behavior settings
    • Adjusted Symbol Include/Exclude settings
    • Modified source server support options

Additional info:

  • This used to work before I changed computers and upgraded Visual Studio
  • Some of the referenced projects don't seem to generate PDB files despite my configuration

Questions:

  1. Why are my breakpoints not visible despite the process appearing to stop?
  2. Why do I see "Symbol loading disabled by Include/Exclude setting" for most modules?
  3. Why aren't some of my projects generating PDB files?
  4. How can I fix this to get proper debugging working like my team members?
  5. Could there be specific settings or configurations on my new laptop causing this issue?

Any help would be greatly appreciated, as I've been struggling with this for quite a while.

I'm having an issue with remote debugging a C# application on a Linux server from Visual Studio. Despite being able to attach to the process, my breakpoints are not being hit, or more specifically - the app seems to stop at breakpoints (it doesn't continue execution), but I don't see the yellow highlight in the code and can't step through the code with F10/F11.

Environment:

  • Visual Studio on Windows (recently upgraded)
  • Remote Linux server
  • C# Console application (.NET 6)
  • Multiple referenced DLL libraries
  • New laptop (problems started when I began using it)

Application structure:

  • My solution consists of a Console App project which I can successfully attach to
  • This Console App references several DLL libraries from other projects in a different solution
  • When debugging, I'm trying to step into functions in these referenced DLLs using F11

What happens:

  1. I can successfully attach to the process on the Linux server
  2. I set breakpoints in my code
  3. The application appears to stop when it reaches a breakpoint (execution pauses)
  4. However, I don't see the yellow highlight in the editor, and I don't have debugging controls (can't step through)
  5. The Call Stack and Threads windows remain empty
  6. The only window showing any information is Output, which shows modules being loaded

Important note:

  • Problems started immediately after switching to a new laptop
  • Other team members can successfully attach to and debug my application from their machines
  • This indicates the issue is specific to my development environment, not the code or the server

What I've tried:

  • Ensuring Debug symbols are set to "Full Symbols" for all projects
  • Setting DebugType to "portable" in the .csproj files
  • Disabling optimization in Debug configuration
  • Installing a fresh version of vsdbg on the Linux server
  • Adding <DebugSymbols>true</DebugSymbols> and <EmbedAllSources>true</EmbedAllSources> to my .csproj files
  • Changing Symbol settings in VS Options to load all modules
  • Extensively modified configurations in Tools > Options > Debugging:
    • Tried enabling/disabling "Just My Code"
    • Modified Symbol loading settings
    • Changed various debugger behavior settings
    • Adjusted Symbol Include/Exclude settings
    • Modified source server support options

Additional info:

  • This used to work before I changed computers and upgraded Visual Studio
  • Some of the referenced projects don't seem to generate PDB files despite my configuration

Questions:

  1. Why are my breakpoints not visible despite the process appearing to stop?
  2. Why do I see "Symbol loading disabled by Include/Exclude setting" for most modules?
  3. Why aren't some of my projects generating PDB files?
  4. How can I fix this to get proper debugging working like my team members?
  5. Could there be specific settings or configurations on my new laptop causing this issue?

Any help would be greatly appreciated, as I've been struggling with this for quite a while.

Share Improve this question edited Mar 26 at 1:50 Jack J Jun 6,0061 gold badge13 silver badges44 bronze badges asked Mar 23 at 19:23 Adi1992Adi1992 775 bronze badges 4
  • This looks like a really weird problem, so a first guess: When you set a breakpoint and attach to the process, does the breakpoint still show in red or does it become an empty circle with an exclamation mark? – PMF Commented Mar 23 at 19:29
  • 1 Debug info is in a pdb file that is usually found in the c# project bin folder under the debug folder (not release folder). When you do not get the correct debug data a few things could be wrong 1) The pdb file is not the same version of executableas the compiled code 2) When you compiled you compile for Release and the Debug folder did not get recompiled 3) You are using a child project with you main project and you included the child release folder instead of the child debug folder. Open the main project csproj file and see if you are building with the child release or debug folder. – jdweng Commented Mar 23 at 21:19
  • 4) the project has both a X32 and an X64 version of the build and you are using the wrong build – jdweng Commented Mar 23 at 21:19
  • Hi, please try to check this option Enable native code debugging to see if your breakpoints are being hit. – Dou Xu-MSFT Commented Mar 27 at 7:52
Add a comment  | 

1 Answer 1

Reset to default 0

Please try selecting Enable native code debugging via Debug->Console application Debug Properties, it opens Launch Profile. Then reattach the Console application to debug.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744271574a4566127.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信