我在同一个解决方案中有两个.net核心2.0项目。 Web API项目和Web MVC项目。 MVC项目使用web api项目。
是否可以同时在visual studio中调试这两个项目,或者我是否需要使用dotnet.exe从命令行运行一个项目并调试另一个?
我希望最终能够调试两者,在两者中放置断点,并使visual studio在调试时在项目之间跳转。
注意:这是在Visual Studio 2017中不是Visual Code。
I have two .net core 2.0 projects both in the same solution. A Web API project and a Web MVC project. The MVC projects consumes the web api project.
Is it possible to debug both projects in visual studio at the same time or do I need to run one from the command line using dotnet.exe and debug the other ?
I would like to end up being able to debug both, place breakpoints in both and for visual studio to jump between projects while debugging.
NB: This is in Visual Studio 2017 NOT Visual Code.
最满意答案
在Visual Studio中,您可以设置多个启动项目一次运行/调试2个项目:
右键单击Solution Explorer中的Solution Explorer然后选择Properties 。 在Common Properties\Startup Project选择Multiple startup project并为要调试的2个项目设置Action to be Start 。In Visual Studio you can set multiple startup projects do run/debug 2 projects at once:
Right click on the solution in the Solution Explorer and select Properties. Under Common Properties\Startup Project select Multiple startup project and set the Action to be Start for the 2 projects that you want to debug.更多推荐
发布评论