简体   繁体   English

调试后自动杀死IIS Express进程(VS Express 2013 Web)

[英]Automatically Kill IIS Express Process After Debugging (VS Express 2013 Web)

I'm developing an ASP.NET (Razor v2) Web Site in Visual Studio 2013 Express for Web, so when I run the site to debug, VS automatically starts up an IIS Express process. 我正在Visual Studio 2013 Express for Web中开发ASP.NET(Razor v2)Web站点,因此当我运行站点进行调试时,VS会自动启动IIS Express进程。

When I stop debugging using the VS "Stop Debugging" button, the IIS Express System Tray and IIS Express Worker Process continue running, even after VS detaches. 当我使用VS“停止调试”按钮停止调试时,即使在VS分离后,IIS Express系统托盘和IIS Express工作进程也会继续运行。 (And, I suspect, carrying a bad state from one run to the next, but that's a different question entirely.) (并且,我怀疑,从一次运行到另一次运行都有一个糟糕的状态,但这完全是一个不同的问题。)

Is there a VS option or project setting somewhere that I can set to automatically kill this process once I hit the "Stop Debugging" control in VS? 是否有VS选项或项目设置,我可以设置为在VS中点击“停止调试”控件后自动终止此过程?

Yes, add the Terminate All button to your debug toolbar 是的,将“ Terminate All按钮添加到调试工具栏

  1. Right click tool bar area 右键单击工具栏区域
  2. select Customize... from context menu 从上下文菜单中选择Customize...
  3. In Customize dialog select Commands tab 在Customize对话框中,选择Commands选项卡
  4. Select Toolbar Radio button 选择Toolbar单选按钮
  5. From Toolbar Dropdown Select appropriate Toolbar 从工具栏下拉列表选择适当的工具栏
  6. Click Add Command... Button 单击Add Command...按钮
  7. From Add Command dialog select Debug Category from list Add Command对话框中选择Debug Category from list
  8. Select Terminate All from Commands list 选择Terminate AllCommandsTerminate All列表
  9. Click OK 单击确定
  10. position Terminate All on the button bar using up/down buttons NB: this is a text only button 使用向上/向下按钮在按钮栏上Terminate All注意NB:这是一个纯文本按钮
  11. Click Close 单击关闭

Just to clarify - I'm using VS2012 Pro and I'm assuming Terminate All exists in VS2013 Express. 只是为了澄清 - 我正在使用VS2012 Pro,我假设在VS2013 Express中存在Terminate All。 If you can't find it I suggest clicking the Keyboard Button on the Customize dialog and search for 'Terminate' 如果找不到,我建议单击“ Customize对话框上的“键盘”按钮,然后搜索“终止”

Turns out this isn't possible, since VS 2013 Express doesn't include the "Terminate All" command. 事实证明这是不可能的,因为VS 2013 Express不包括“终止所有”命令。 Would need the full version of VS 2013. 需要完整版的VS 2013。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM