Ignore a project in Visual Studio during debugging

In Visual Studio, if you have a solution with many projects, can you instruct the debugger to ignore some of the projects? Treat them as external DLLs in this sense?

We have a lot of helper code that I would like to debug. For example, if I am in a function call and I enter it, I would like to skip the IoC code and the base code of the base class and go to the meat of the classes I'm working on. Most of the things I would like to step over are in support assemblies.

I would like to avoid unloading the projects, as other team members are actively working on these parts, and I want to pick up their changes when I receive the latest data from the control source. Similarly, I do not want to configure an alternative solution for the same reason. It is also impractical to put the debugger attributes on the code of other people.

If there is a way to instruct VS, I am only interested in individual assemblies, that would be ideal.

+6
source share
1 answer

Well there is :)

Tools-> Options-> Debugging-> Symbols

The option "Automatically download characters for:" appears on the right tab. In this case, select the option "Specify excluded modules" and add your library name there. Everything is ready.

Also, do not forget to set the option “Warn if there is no user code at startup” in “Tools-> Options-> Debugging-> General.” Uncheck the box “Warn if there is no user code at startup.” Otherwise, visual studio will display an annoying message stating that the source code is not available.

It is worth noting that the option described above is to exclude some assemblies from debugging. The opposite is also possible. If you have several assemblies to be excluded and you only need to debug one or two assemblies, you can use the "Only specific modules" option in the same menu. Tools-> Options-> Debugging-> Symbols → "Automatically download symbols for:". Unlike the above option, it just loads only the specified characters for debugging.

+6
source

Source: https://habr.com/ru/post/985631/


All Articles