Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No Source Available" when managed exception occurs - WPF Visual Studio 2010

for some reason, my visual studio 2010 is not loading debug symbols on my own code.

i am using a default WPF application solution. with a sample WPF app i am working on, and running in Debug mode.

when i go into debug, i can step through my code.

BUT

when exception happens in my code (i.e. throw new Exception("test")), visual studio gives me the blue blank screen with "No Source Available. No symbols are loaded blah blah.."

AND

i can actually "view" exception details, where it will tell me the line of code my exception occured on.

so it does know what happened.. it seems.

it seems to think that PDB files are not loaded.

my setup:

options > Deubg > "Enable just my code (managed only)" is checked. application properties : 1 project running in Debug x86

like image 463
Sonic Soul Avatar asked Nov 06 '22 12:11

Sonic Soul


1 Answers

Loading symbols should be configured on : Tools -> Options -> Debugging -> Symbols where you can choose to Automatically load symbols for: "All modules" or "Only specified modules". This should be set to all modules. If you get "no source available" for exceptions in the .NET framework like I did you should hit the "empty symbol cache" button. This worked for me.

like image 173
Bart Avatar answered Nov 15 '22 07:11

Bart