立即在Visual Studio中调试两个.net核心项目(Debugging two .net core projects in Visual Studio at once)

编程入门 行业动态 更新时间:2024-10-09 00:39:35
立即在Visual Studio中调试两个.net核心项目(Debugging two .net core projects in Visual Studio at once)

我在同一个解决方案中有两个.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.

更多推荐

本文发布于:2023-07-04 09:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1022345.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:核心   两个   项目   Studio   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!