3

I'm using Visual Studio 2019 Community Edition (Version 16.3.7), .NET Framework 4.5 and C#. Trying to attach to process in debugging mode, but having a long "Loading symbols for systemDllName from: Microsoft Symbol Server" process, something like 5-7 minutes. As a result, I can't attach to windows process and debug.

After some investigation, I've found out that MyProject.exe module has Symbol Status "Binary was not built with debug information". I tried to find similar issues here, but they didn't help, list of similar issues:

Also I tried to check manually all csproj files to write in "Debug" mode building and it didn't help. I tried to do all basic stuff as clean solution/delete all breakpoints/check and uncheck "Only my code" in debug settings and it didn't help.

Interesting fact: sometimes debugger works correctly and I don't have any issues at all. For example, I had rebooted the OS and it helped, but sometimes it doesn't help.

The main problem: I don't know what exactly goes wrong (pdb.files loading? loading from MS server? some problems with building? etc) and why sometimes it works correctly?

Some examples: Loading symbols for 5-7 minutes Module window. Guys, sorry for that terrible censorship :)

Vadym
  • 63
  • 7
  • 1
    Do you really need `pdb` files for .NET from MS symbols servers to debug your code? Why just don't debug your own code? – Pavel Anikhouski Jan 13 '20 at 16:02
  • @PavelAnikhouski actually I don't need it at all, it happens automatically, even if I explicitly check "Only my code". I think it happens because all .NET assemblies have references on basic system dlls with all basic namespaces, that's why I can't avoid it. But anyway, the main issue has connection with my own module. – Vadym Jan 13 '20 at 16:11
  • And what version of Visual Studio 2019 Community are you using? – Train Jan 13 '20 at 16:16
  • @Train Version 16.3.7 – Vadym Jan 13 '20 at 16:21
  • Have you tried reinstalling VS or Upgrading? If it works sometimes then try starting from there. – Train Jan 13 '20 at 16:25
  • @Train thought about it. But I have hard env to install in my proj, and I wanted to do reinstalling as last option. Also, reinstalling doesn't guarantee that this issue will not happen again. – Vadym Jan 13 '20 at 16:28
  • That's true, however if you followed all of those links and still can't get it to work. It's very difficult for us to help because we can't see your env, my suggestion would be to start from square 1. – Train Jan 13 '20 at 16:32
  • @Train upgrading VS to the last stable version (16.4.3) helped for now, but I'm not sure, because rebooting sometimes helped too. I'll continue to observe this problem, if upgrading really helped, then I'll mark it like answer. – Vadym Jan 15 '20 at 08:39
  • Ok, that sounds good. How often did you experience the problem? – Train Jan 15 '20 at 14:17
  • @Train Several times for sure. And each time this problem hardly stopped working process. As I understood from https://devblogs.microsoft.com/devops/understanding-symbol-files-and-visual-studios-symbol-settings/ here, there is something like "linker" in debugger, and this "linker" link running program's memory area to your source code, using special debug info (symbols). In result, you can see your program running line by line in your sources, but sometimes this linker crashes and doesn't link correctly. – Vadym Jan 15 '20 at 14:38

1 Answers1

0

So, as @Train suggested, the best way to handle this issue was VS upgrading. I had 16.3.7 version and upgraded to 16.4.3 version.

It is not 100% guarantee that the issue won't shoot you again, but it is working for now. In case, that all common stuff (clean solution/folders/checks in menu/etc) doesn't help you try to play with VS version.

Vadym
  • 63
  • 7