问题
A new command prompt pops up when I debug a windows console application and it doesn't go away when application finishes. I have to plenty (in fact 18) of them open and it is annoying.
The following doesn't help:
Pressing "X" button on top right of command prompt.
Go to task manager and kill the cmd.exe.
kill/pskill commands etc.
I know the last resort would be to reboot the machine. But I want to avoid that. Is there a option? Thanks in advance.
回答1:
Are you using Visual Studio 2005 or 2008 by any chance?
There are/were issues with a specific Windows hotfix that causes this sort of behavior, and there have been threads about this issue:
Debugged Program Window Won't Close
http://blogs.msdn.com/b/debugger/archive/2010/03/11/help-my-console-windows-won-t-go-away.aspx
http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/e6d4a4f5-7002-401a-90e1-6174d7f9e3ca
A fix is available now, and can be downloaded from this Microsoft Knowledge Base article:
http://support.microsoft.com/kb/982551
来源:https://stackoverflow.com/questions/3920442/unable-to-kill-instances-of-cmd-exe-on-win-xp