Debugged Program Window Won't Close

前端 未结 7 1552
闹比i
闹比i 2021-01-18 00:27

I\'m using VS 2008 on a 64-bit XP machine. I\'m debugging a 32-bit C++ DLL via a console program. The DLL and EXE projects are contained in the same SLN so that I can modify

相关标签:
7条回答
  • 2021-01-18 01:04

    Console windows are owned by csrss.exe, which is a system process, and actually the only process that you cannot kill (at least on XP, you can kill the other system processes if you do it in the right order, look for the article "Running Windows with No Services" by Mark Russinovich). So unfortunately, power cycling seems to be the only way to get rid of the zombie console windows.

    0 讨论(0)
  • 2021-01-18 01:04

    Mcrosoft acknowledge and describe this problem, here: http://support.microsoft.com/kb/982551/

    They have released a hot fix, which you can get from: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=982551&kbln=en-us

    (you have to supply an email address, then they send you a password protected HotFix installer)

    0 讨论(0)
  • 2021-01-18 01:06

    The same thing recently started happening to me. I'm using Windows XP 32-bit, VS 2008. I don't think this is connected to how your projects are organized. Perhaps a patch installed through Windows Update caused this.

    0 讨论(0)
  • 2021-01-18 01:08

    Some good solutions have been provided here.

    An alternative: Instead of stopping a debug session by pressing SHIFT-F5, hit CTRL-C, that causes the program to end normally eliminating the source of the problem.

    0 讨论(0)
  • 2021-01-18 01:13

    I've definitely seen oddities with handles not being released and task manager not working right. I've found that Process Explorer does a good job and figuring out what's going on with orphaned windows, file locks, and generally odd behavior that happens.

    0 讨论(0)
  • 2021-01-18 01:14

    The best thing I was able to find is a workaround: binding the detach all to the shift-F5 button. In this way you basically release the window from the debugger and you can close the window itself w/o ending up with an orphaned cmd window. Hopefully MS will come up with a solution. Tools -> Options -> Environment -> Keyboard.

    By the way the process I described above only works sporadically. Since this problem seems to occur quite often, is there a way to finally resolve it once and for all?

    0 讨论(0)
提交回复
热议问题