How do I reset Visual Studio so that it once again searches for source files of DLLs while debugging?
Asked Answered
A

3

10

In the process of debugging my WPF project, I regularly encounter thrown exceptions. When these exceptions fire, if the exception is thrown by my application's code, I am able to browse the source code. All is well.

HOWEVER, if an exception is thrown by code hosted in another assembly (that we built), I am unable to browse for the source code. I was at some point in the past prompted to browse for the original source code file, but "canceled" the dialog. Now, I want a do-over.

Is there a way to grant me a do-over on locating these source files? I'm no longer prompted for them. I assume Visual Studio stores my source code browsing preferences somewhere, but I don't know where. I get the idea this do-over is possible, but I don't even know the words to search for on Google to get what I want.

What should I do?

Apo answered 8/7, 2010 at 15:10 Comment(0)
S
9

In the Solution Explorer right click on the solution and go to PropertiesCommon PropertiesDebug Source Files.

Then on the right hand side there is a list for "Do not look for these source files:". Deleting the entry from that list should prompt you for the source location again.

Spermato answered 4/3, 2011 at 20:25 Comment(1)
I wonder why this list gets updated through no explicit action of mine.Deciduous
S
2

Delete the hidden .suo file in your solution directory.

Sixpence answered 8/7, 2010 at 15:48 Comment(2)
Would that nuke all of the other settings for the solution?Emmen
Just IDE state, you don't lose the project settings nor Tools+Options settings. Rename it instead of deleting it if you worry about it.Sixpence
L
1

You may have to reset the visual settings. You can do this by clicking "Tools", Import Export settings.

For the default source path, make sure your PDB files are replaced correctly where Visual Studio is adding your reference DLL from. The PDB file contains the path of the source code, it's not Visual Studio.

You must rebuild your project (referenced assemblies one) and manually delete PDB files in your debugging project before adding references. It may be a bug in Visual Studio in case the files are locked or if for some reason the PDB files may not be updated.

Lahr answered 8/7, 2010 at 15:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.