0

I am working with Visual Studio 2015.

I have a solution Sol_Base which has multiple projects Proj_Base_Web, Proj_Base_Bo and Proj_Base_DA. All these projects are class libraries. These are considered Base projects.

I have a solution Sol_App which has multiple projects Proj_Web, Proj_BO, Proj_BL and Proj_DA. Proj_Web is ASP.NET Web Application while other projects are class libraries.

Sol_App has reference to the Base projects. Lots of objects in projects of Sol_App extends from objects of Base projects. I run the app through Sol_App.

I can add breakpoints in projects of Sol_App so I can debug it when running the app. But I want to be able to debug the code in Base projects as well while running the app. Which means I want to add breakpoints in projects of Sol_Base. How can I do that so that they become into play when I am running the app?

Thanks

srh
  • 1,661
  • 4
  • 30
  • 57
  • How are you referencing the projects between solutions? – Chetan Aug 22 '17 at 00:23
  • Possible duplicate of https://stackoverflow.com/questions/654696/how-to-debug-external-class-library-projects-in-visual-studio – CharithJ Aug 22 '17 at 00:23
  • @ChetanRanpariya A project in Sol_App has assembly reference of a project in Sol_Base. For example Proj_Web has assembly reference of `Proj_Base_Web.dll`. – srh Aug 22 '17 at 00:57
  • if the base Sol_Base is also in the solution and if your reference is added, then when you put a break point in Sol_Base, it should hit. make sure you cleaned and compiled the base projects too. – Sin Aug 22 '17 at 01:41
  • @srh, Could you debug your project now? If you get any update, please feel free to share it here. – Jack Zhai Aug 28 '17 at 09:06

2 Answers2

0

You can debug one reference project(class library) in two solutions using attach to process in your side.

Reference:

Debug Multiple Solutions VS 2012

Another suggestion is that add them to a single solution would be also a workaround for it. Or copy the debugging file manually:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/f6dcb520-4c79-4258-af1d-d7c16a963d39/how-to-debug-a-routine-from-a-dll-created-in-another-solution?forum=vbgeneral

Jack Zhai
  • 6,230
  • 1
  • 12
  • 20
0

The quickest way to do this on a one-off basis is to open the Proj_Base file directly in the Visual Studio instance in which you are editing and launching Sol_App (File => Open => File). You don't need to add the file to the solution. Just having it open in the editor will let you create your breakpoints.

bbsimonbb
  • 27,056
  • 15
  • 80
  • 110