Debugging through different solutions in Visual Studio

Solution 1:

There is no way to have two instances of Visual Studio debugging the same process. This is a limitation of Windows, and most other operating systems in that at most one process can be debugging another.

It is a perfectly supported scenario though to debug binaries that are not a part of your solution. As you've noted you can happily step into binaries from Solution B while debugging from a Solution A.

One item that will get in the way here though is the debugging feature named "Just My Code". This is a feature aimed at minimizing the debugging experience to just the code in your solution. It is great for normal solutions, but bad when you're debugging arbitrary binaries. It's likely causing a lot of the problems around break points you're seeing. You'll want to disable it by doing the following

  • Menu ToolsOptionsDebugging
  • Unchecked "Enable Just My Code"

Solution 2:

You can only have one debugger debugging a process at once. So that means you only need one instance of Visual Studio open.

However, you can just open the .cpp/.cs/whatever file from Solution B into Solution A's copy of Visual Studio and set breakpoints. It'll still work even though those files aren't actually part of the solution.

Solution 3:

What if you explicitly load the symbols from Solution A?

If you go to menu ToolsOptionsDebuggingSymbols, you can point it at the .pdb file from Solution A.

Then you can see if the symbols are loaded from your binaries by going to menu DebugWindowsModules while debugging.