如何将调试器附加到 IIS 而不是 ASP.NET 开发服务器?

如何将调试器附加到 IIS 而不是 ASP.NET 开发服务器?

问题描述:

我有一个 ASP.NET 网站,当我按 F5 时它会自动附加到 ASP.NET 开发服务器,我如何在按 F5 时附加到 IIS 工作进程?

I have an ASP.NET website and when I press F5 it automatically attaches to the ASP.NET Development Server, how do I attach to IIS worker process instead when I press F5?

打开项目属性,转到 web 选项卡并选择 IIS 选项.

open project properties, go to the web tab and choose the option for IIS.

这实际上会在 IIS 中启动应用程序的一个实例并附加调试器.如果您只想附加到现有的 IIS 实例,请从调试菜单中选择附加到进程.

That actually starts an instance of the app in IIS and attaches the debugger. If you only wanted to attach to an existing IIS instance, choose attach to process from the debug menu.