简体   繁体   中英

How to add breakpoint in another solution in Visual Studio?

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM