在 VS 中附加到工作进程的更快方法

发布于 2024-09-04 06:51:58 字数 554 浏览 7 评论 0原文

我正在使用 VS 2010。在 VS 2010 中,当您想通过 IIS(而不是 VS 内置 Web 服务器)测试本地 IIS 站点时,附加到工作进程会更加痛苦。

更痛苦的是,因为现在当您通过“调试”菜单选择工作进程()时|附加到进程 | w3wp.exe 它会弹出一个附加提示,询问您是否确定要执行此操作。

即使在此之前,附加到 VS 早期版本中的进程也是非常痛苦的。我每天必须执行此操作 200 次,这浪费了我很多时间,因为点击并执行此操作需要花费 5-10 秒。

现在,如果您有两个不同的工作进程正在运行,那么我可以看到需要进行选择。但在此之前,仅仅进入附加屏幕就很痛苦。

有人知道除了附加到进程对话框之外的快捷方式或更快的方法来附加到 VS 中的工作进程吗?

我不明白为什么微软不添加一个漂亮的工具栏图标或一些可以让你直接跳转到“附加到对话框”屏幕的东西,甚至更好的是你可以指定只显示工作进程作为一个选项,这会让我省去麻烦筛选该列表的时间日志,即使它已经按字母顺序排列。我仍然需要滚动才能找到它。

不管怎样,它现在变成了一个巨大的烦恼......我真的厌倦了每次都让附件进入该过程的漫长过程。

I'm using VS 2010. And in VS 2010 it's even more painful now to attach to the worker process when you want to test your local IIS site via IIS, not the VS built-in web server.

It's more painful because now when you select the worker process () via the Debug Menu | Attach to Process | w3wp.exe it brings up an additional prompt asking if you're sure you want to do this.

Even before this, attaching to the process in previous versions of VS was just outright painful. I must do this 200 times a day which wastes a lot of my time when it takes 5-10 seconds to click through and do this.

Now if you've got 2 different worker processes going, then I can see a need to choose. But before that, just getting to that attach screen is simply painful.

Anyone know a shortcut or just a quicker way other than the attach to process dialog in order to attach to the worker process in VS?

I don't understand why Microsoft doesn't add a nice toolbar icon or something that jumps you right to that Attach to Dialog screen and even better you could be able to specify only to show worker processes as an option which would save me a hell of a log of time sifting through that list even though it's already alphabetized. I still have to scroll to get to it.

Anyway, it's becoming a huge annoyance now..I'm really tired of the long way to get the attachment going to that process every single time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拒绝两难 2024-09-11 06:51:58

嗯,这对你正在做的事情来说并不是一个巨大的飞跃,但它可能会简化你的工作流程。你看过命令定制吗?

  1. 点击工具->自定义...(或右键单击工具栏并选择自定义...)
  2. 从自定义对话框中,单击命令
  3. 选择您的目标,(我建议使用上下文菜单)
  4. 选择您的子目标(如果是上下文菜单,请选择编辑器上下文菜单 | 代码窗口)
  5. 单击“添加命令”
  6. ,从“添加命令”对话框中选择“调试”类别
  7. 从命令列表(靠近顶部)中选择“附加到进程...”
  8. 单击“确定”
  9. 单击“关闭”
  10. 使用新的快捷方式!

希望这有帮助! :)

ps:如果您将“附加到进程...”命令添加到“代码窗口”上下文菜单,则您应该能够通过右键单击代码窗口中的任意位置来启动“附加到进程”对话框。

Hm, not a great leap over and above what you are doing, but it may ease your workflow. have you taken a look at command customization?

  1. Click Tools -> Customize ... (or Right-click tool bar and select Customize ...)
  2. From Customize dialog, click Commands
  3. Select your target, (I suggest Context menu)
  4. Select your sub target (if Context menu, select Editor Context Menus | Code Window)
  5. Click Add Command
  6. From Add Command dialog, select Debug category
  7. Select Attach to Process... from command list (near top)
  8. Click OK
  9. Click Close
  10. Use your new shortcut!

Hope this helps! :)

ps: if you added Attach to Process... command to Code Window context menu, you should be able to launch the Attach to Process dialog from right clicking anywhere in a code window.

寂寞笑我太脆弱 2024-09-11 06:51:58

在附加时记录,并为该宏分配快捷方式和/或为其分配菜单项。
步骤:

  1. 工具->宏 -> 录制临时宏
  2. 附加到 w3wp,单击忽略等
  3. 停止录制宏
  4. 保存
  5. 添加菜单项(例如在“调试”下) 右键单击​​ VS 的菜单条 -> 宏自定义... -> 命令 -> ...添加命令-> Macros.YourMacroNAme(例如 DebugIIS)

Record a macro while attaching and assign a shortcut for that macro and/or assign a menu item for it.
Steps:

  1. Tools -> Macros ->Record Temporary macro
  2. Attach to w3wp, Click on Ignore, etc
  3. Stop recording the macro
  4. Save it
  5. To add a menu item (say under Debug) Right click on VS's Menu strip -> Customize... ->Commands -> ... Add Command -> Macros.YourMacroNAme(DebugIIS for eg)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文