Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot load symbols, or break in core assemblies, loading Symbols option grayed out

I've set the options "Use symbol server" and just to be certain the correct symbols were loaded, I removed the symbol cache. When running my ASP.NET application I saw the popup telling me the symbols were being downloaded.

I've disabled "Just my code", and enabled "Enable .NET Framework source stepping". In the past this was enough to be able to step through .NET code libraries.

When I break using IntelliTrace, all non-usercode in the call stack is greyed out. Checking the modules-window it says for instance for System.Web.Dll and mscorlib "Symbols not loaded" for System..dll and System.Xml.dll it says "Symbols loaded".

Normally you can then right-click and select "Load symbols", but this is grayed out. Any idea to get this working again?

http://www.undermyhat.org/blog/wp-content/uploads/2011/03/Grayed-out-Load-Symbols.png

like image 378
Abel Avatar asked Mar 06 '11 19:03

Abel


Video Answer


2 Answers

Because Symbol loading can be slllloowww and you aren't always interested in every symbol table, there's an option to Load a particular one manually. The reason that is greyed out is because you are loading them automatically. Here's a screen shot with manual set and the option enabled.Load Auto

To get in this state, I setup my Symbol Settings to load all symbols Except, and I added NHibernate to the list. When I break in NHibernate, the Symbols are greyed out and can be loaded manually: NHibernate View

I then I have the option to load them: enter image description here

like image 74
Ritch Melton Avatar answered Sep 22 '22 12:09

Ritch Melton


Ritch's answer pointed me in the right direction, but it wasn't the solution. Here's what was happening:

When you click Call Stack in a history-event of IntelliTrace, this will show the stack-trace. Normally, in a stack-trace you can right-click and load symbols, however:

  • From an IntelliTrace historic event, this will always be disabled. Break normally in your code, and this will work;
  • You can't even load symbols from the Modules View when in a historic event (also grayed out);
  • When a module is specified as "always load manually" (aptly named "Default", see screenshot in Ritch's post) it will not automatically be loaded. When you then load it by hand, it still won't be possible to step into framework code (at least, it wasn't possible for me, possibly a VS 2010 bug). To solve this:
    • select "Always load automatically" (note: you won't see a checkmark signifying that you selected this!) and
    • break execution and
    • (arguably) stop the development web server (this helped for me in some cases)
    • start debugging again.

To be honest, I find this relatively unclear behavior of Visual Studio. In the past, I apparently was lucky enough to have the settings set correctly. This is not "it just works", but only if you meticulously go through the correct procedure, it'll work as expected.

like image 38
Abel Avatar answered Sep 21 '22 12:09

Abel