Wednesday, October 20, 2010

Solution to ‘No symbols are loaded for any call stack frame’ error

I’ve been working on a .NET 3.5 Framework (VS 2008) solution for months, and all of a sudden I started getting a series of very mysterious error and warning messages while trying to debug a class library in my solution.  I’m posting my findings because I couldn’t find a viable solution after much Google searching.

MessageBox:  “No symbols are loaded for any call stack frame. The source code cannot be displayed.”

Output window: “Stepping over method without symbols”

Output window: “Stepping over non-user code”

The code I was trying to debug was a class library of my own code within my solution.  I had not changed any of my Options > Debugging settings.  I tried a variety of suggested fixes, all without success, including a complete rebuild of my solution (delete, restore from source code control, rebuild), various Options > Debugging settings changes (such as uncheck the “Enable Just My Code” option), and so on.

I finally determined the source of my problem.  I had made a code change to use Reflection to load one of my class library assemblies into a static method.  It was that very assembly that I was no longer able to debug.  The solution was to create a new class library containing only the classes/methods that I needed for the reflection call, and then all the rest of my original class library was again available for debugging because that code was no longer included in the Reflection call.

I hope others find this solution to be helpful!