0

我在 Visual Studio 2012 的同一解决方案下有 2 个项目。

第一个是WPF项目,第二个是ASP项目。

WPF 通过 webbrowser 控件调用一个 asp 页面。无论如何我可以进入 ASP 页面背后的代码,即使它不是我的启动项目?

4

2 回答 2

2

您可以设置调试时加载的 WPF 项目和ASP 项目。在解决方案资源管理器中,右键单击解决方案节点并选择Properties。确保在左侧树中选择Common Properties\Startup 项目。单击Multiple startup projects单选按钮,然后在列表中将调试 (F5) 时要启动的项目设置为Start

现在,当您按 F5 进行调试时,两个项目都将启动,您可以在两者中设置断点。

于 2012-08-15T02:54:32.280 回答
1

You need to attach the debbuger to corresponding ISS process. In Visual Studio:

Click "Debug" from the menu bar Click "Attach to Process" Check the "Show processes from all users" checkbox in the bottom left corner Select aspnet_wp.exe (or w3wp.exe depending on your ISS version) from the process list Click "Attach"

于 2012-08-15T02:04:59.027 回答