Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I have two solutions lets say SolutionA and SolutionB. Here SolutionB has class library which is referred in SolutionA. Now I want to step-in through the SolutionB from SolutionA while debugging it.

Please assist.

Many Thanks

What I have tried:

I tried this, sort of working but not completely.
a) opened both solutions in separate VS2015 instances with break points in it.
b) Unchecked "Enable Just my code".
Ran solution A and hit the breakpoint in SolutionA then I did F11 for Step-in to SolutionB. It was stepped-in but respective file (Which is in SolutionB) opened in same VS2015 instance where SolutionA is running.

I want debugger should jump on to SolutionB VS2015 instance.

I tried even attach to process, It was doing same along with SolutionB VS2015 instance went into some weird blocking state (there were four icons on top. Go to live visual tree,Enable selection, Display layout adorners, track focused element)
Posted
Updated 30-Mar-18 9:57am
v5

You only need a single instance of the debugger to do this. Start debugging the executable project, and when it makes a call to the class library use the "step into" button (or F11), to follow the path through the library code.
 
Share this answer
 
Comments
krishna Dev 30-Mar-18 12:36pm    
I did. but debugger not jumping to another solutionB instead it is opening same class file (preview file) with in SolutionA instance. Symbols and dll loaded successfully
Richard MacCutchan 31-Mar-18 3:48am    
Of course it won't; you cannot run a DLL in isolation.
As far as I know you can't use two debuggers for the same process.

If solution A is the executable use the debugger on that. Before starting the debug session, open the desired file from Solution B to Visual Studio where Solution A is open. Make sure that you open the solution B file from correct folder, the folder from which the assembly B is compiled that you're referencing.

Place a breakpoint on a desired code line in the newly opened file and start debugging. It now should stop once the breakpoint is hit.
 
Share this answer
 
Comments
krishna Dev 30-Mar-18 16:57pm    
SolutionA is console application and SolutionB is an class library. I compiled SolutionB added its dll & pdb to SolutionA. Openned both solutions separately in different VS2015 instances. But no luck
Wendelius 30-Mar-18 17:03pm    
As I said, try using just one Visual Studio instance. Open solution A in it and also open a file from Solution B. Place a breakpoint in that file and run the debugger. There's quite similar conversation here: Stepping into a referenced DLL[^]
krishna Dev 30-Mar-18 17:09pm    
Currently Its working like that. SolutionB file opening in solutionA while debugging. I can happily can step through the SolutionB file, but I am looking for debugger should jump to new VS2015 instance where SolutionB opened.
I need this way because there are few more dependencies in SolutionB (like Solution-B dependent on Solution-C)
Wendelius 31-Mar-18 1:40am    
As said in the beginning my understanding is that you can use only one debugger for a single process. You cannot switch debugger during the debug session.

If you have pdb's for the other assemblies also you should be able to jump into their code as well. Just make sure that you have referenced all assemblies in assembly A.

Also you can open an interesting file from assenbly C, D, ... beforehand and place breakpoints if needed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900