在 VS11 中附加到 w3wp.exe 的键盘快捷键 [英] Keyboard shortcut to attach to w3wp.exe in VS11

查看:20
本文介绍了在 VS11 中附加到 w3wp.exe 的键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从 VS11 删除宏后,我无法再触发 这个宏附加到网络服务器 使用键盘快捷键.

Since VS11 removed macros, I can no longer fire this macro to attach to the webserver using a keyboard shortcut.

在 VisualStudio 2012 中是否有另一种方法可以启动调试器并使用键盘快捷键附加到特定进程?

Is there another way to start the debugger and attach to a specific process with a keyboard shortcut in VisualStudio 2012?

推荐答案

如果您在项目属性中选中该框,Visual Studio 中的调试器会自动附加到 Web 服务器.为此,宏从来都不是必需的.

The debugger in visual studio automatically attaches to the web server if you check that box in the project properties. A macro has never been necessary for that.

在项目属性的Web"选项卡上,选中 Visual Studio 中的使用本地 IIS Web 服务器"框.然后选中底部调试器"下的ASP.NET"框

Check the "Use Local IIS Web server" box in Visual Studio, on the "Web" tab of your project properties. Then check the "ASP.NET" box at the bottom, under "Debuggers"

要调试,只需按 F5.

To debug, just hit F5.

编辑

要让 F5 简单地附加到 w3wp.exe...

To get F5 to simply attach to w3wp.exe...

确保您将 Web 项目设置为 StartUp 项目

Make sure you have a web project set as the StartUp project

在该 Web 项目的设置 Web 选项卡上,只需选择使用本地 IIS Web 服务器"并输入您用来访问站点的 url(该 url 仅在您将开始操作"保留在当前页面"上时才真正重要).我不喜欢启动浏览器,因为很有可能我实际上是在项目的另一个站点上.但最棒的是,一旦它附加到 w3wp.exe,它将调试任何站点.

On that web project's settings Web tab, just select "Use Local IIS Web server" and put in the url you use to go to your site (the url really only matters if you keep the Start Action on "Current Page"). I don't like having a browser get launched, because there's a good chance I'm actually on another site in the project. But what's great is once it attaches to w3wp.exe, it'll be debugging any site.

这篇关于在 VS11 中附加到 w3wp.exe 的键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆