如何关闭“孤儿”在视觉工作室内打开的控制台窗口? [英] How to close an "orphaned" console window that was opened from within visual studio?

查看:172
本文介绍了如何关闭“孤儿”在视觉工作室内打开的控制台窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在Visual Studio中使用控制台应用程序时,我将通过按F5运行应用程序,使其进入调试模式。偶尔(我不知道这是怎么回事),我将在Visual Studio中回到编辑模式,调试的控制台窗口仍将被打开。

When working on console applications in Visual Studio, I will run the application by pressing F5 to bring it into debug mode. Occasionally (and I'm not sure how this happens), I'll get back into "edit mode" in Visual Studio and the debugged console window will still be open.

它将保持开放但完全无响应。我无法通过右键单击窗口并点击关闭关闭窗口;我不能通过任务管理器关闭它,我不能通过结束一个特定的过程(据我所知)关闭它。实际上,如果没有实际按下电源按钮重新启动电脑,我甚至不能退出Windows。

It will remain open but entirely unresponsive. I can't close the window by right-clicking the window and clicking "close"; I can't close it via the Task Manager, and I can't close it by ending a particular process (to my knowledge). In fact, I can't even exit Windows when this happens without physically pressing the power button to reboot my computer.

如何让窗口关闭而无需重新启动计算机?

How can I get the window to close without having to reboot my computer?

系统信息:Windows XP SP3,Visual Studio 2010

编辑:通常会在我进入调试模式后发生。所有异常都冒泡起来并打印到控制台,所以不是因为异常导致应用程序中断,而是有时我会逐步执行应用程序,直到我到达应用程序的一部分,例外是 em>,但在它实际上被抛回到UI之前。

It usually happens after I break into debug mode. All exceptions are bubbled up and printed to the console, so it's not because the exception causes the application to break, but sometimes I do step through the application until I get to the part of the application that the exception is caught, but before it actually gets thrown back to the UI.

推荐答案

我一直在使用ALMOST同样的问题,发现一个不同的解决方案,所以张贴在这里,以帮助别人...

I've been having ALMOST the same problem, and found a different solution, so posting here in case it helps someone else...

在我的情况下,我运行XP SP3和VS 2005.
如果我停止调试控制台应用程序(有时候)命令窗口不会关闭。

In my case I'm running XP SP3 and VS 2005. If I stop debugging the console app (sometimes) the command window won't close.

问题是实际上退出的过程,它根本不会出现在任务管理器,所以没有办法做任何事情的窗口或关闭。窗口仍然响应标记/复制/粘贴/滚动等,但是就是这样。

The problem is the process has actually exited, it simply doesn't appear in task manager, so there's no way to do anything with the window or shutdown. The window remains responsive to mark/copy/paste/scroll etc, but that's it.

在MS支持中找到一个热修复:
http://support.microsoft.com/kb/982551

Found a hot fix here on MS support: http://support.microsoft.com/kb/982551

这篇关于如何关闭“孤儿”在视觉工作室内打开的控制台窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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