Killing console-mode debug = kill DevStudio? 
Author Message
 Killing console-mode debug = kill DevStudio?

I'm currently debugging a console-mode application (nothing fancy, just a
plain and simple main() app) and I have an unfortunate tendency to hit the
little "X" button in the top right of the DOS box window to kill it when it
crashes.

 What I'm finding is that killing a DOS prompt that DevStudio is debugging
by any means other than shift-f5 makes DevStudio very unhappy indeed --
once the app has gone away without DevStudio telling it to, I then can't
build until it's managed to stop debugging; but it can't stop debugging
until it's managed to kill the prompt _itself_. At this point I end up
having to kill DevStudio itself -- it says "warning, this will stop
debugging", and gets unhappy again, and I have to kill it off using the
Windows kill-unresponsive-app stuff. (Win95, all of this).

 Is this just a flaw in DevStudio which I'm going to have to live with, or
is there any way to tell it that an application has gone away and that
DevStudio should start being useful again? I can always retrain myself not
to kill prompts like that if I have to, I guess..

 Thanks,

 -- dan



Fri, 15 Dec 2000 03:00:00 GMT  
 Killing console-mode debug = kill DevStudio?

Without getting into all the{*filter*}details of this stuff (you can look at the
debug APIs if you want, see DebugActiveProcess) the answer is "Don't do
that".  Have VC++ kill the app by telling it to stop debugging.

remember VC++ is debugging your application, not the DOS box itself, so
killing the DOS box kills the app without notifying anyone (the same as
calling TerminateProcess)

--
Isn't it a bit unnerving that doctors call what they do "practice"?

 ---------------------------------------------------------------------------
---
| Author for Pinnacle Publishing "Visual C++ Developer"
http://www.*-*-*.com/ |
| http://www.*-*-*.com/
|
 ---------------------------------------------------------------------------
---



Fri, 15 Dec 2000 03:00:00 GMT  
 Killing console-mode debug = kill DevStudio?



Quote:
> Without getting into all the{*filter*}details of this stuff (you can look at
the
> debug APIs if you want, see DebugActiveProcess) the answer is "Don't do
> that".  Have VC++ kill the app by telling it to stop debugging.
> remember VC++ is debugging your application, not the DOS box itself, so
> killing the DOS box kills the app without notifying anyone (the same as
> calling TerminateProcess)

 Oh, sure, I know that what I'm doing is a Bad Thing -- I don't expect VC++
to handle this particularly elegantly. I'm just kinda surprised that it
effectively kills VC++, that's all. Ah well, time to retrain myself out of
that habit..

 Thanks,

 -- dan



Sat, 16 Dec 2000 03:00:00 GMT  
 Killing console-mode debug = kill DevStudio?

Quote:
>>I'm just kinda surprised that it effectively kills VC++

Look at the debug API's, it really doesn't have anything to do with VC++
(AFIK).  If you have VC++ attach to a running process to debug it, and then
you tell VC++ to stop debugging it will kill that process.  Its the same
thing here, VC++ is debugging the console app (not the console window
itself) so when you kill the console window, VC++ has nothing to debug.
It's the equivalent of loading an application and then deleting some of the
DLL's the program uses (assuming you could do that).  All of a sudden its
gonna act stupid.

--
Isn't it a bit unnerving that doctors call what they do "practice"?

 ---------------------------------------------------------------------------
---
| Author for Pinnacle Publishing "Visual C++ Developer"
http://www.pinpub.com/ |
| http://lucifer.lotus.com/jim/main.htm
|
 ---------------------------------------------------------------------------
---



Sat, 16 Dec 2000 03:00:00 GMT  
 Killing console-mode debug = kill DevStudio?

Quote:
> Its the same
> thing here, VC++ is debugging the console app (not the console window
> itself) so when you kill the console window, VC++ has nothing to debug.

 Right, yes, I hadn't thought of it like that -- there's that extra level
of process hierarchy in there to confuse matters, I guess. And given
Win95's general lack of clue with process management overall, I can see how
things would go askew.

 -- dan



Sun, 17 Dec 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Help: kill sub-process after parent killed

2. Killing a console window created using AllocConsole() in an MFC GUI app

3. Killing a Console Process

4. How do I kill processes from within a Console App

5. Anybody have time to kill debugging?

6. Launch New DevStudio; Default DevStudio Open Mode

7. Killing you softly with my file, killing you softly ...

8. Start and Kill a Thread

9. EnableViewState kills event handler

10. Kill tread

11. Will the failure of .NET kill Microsoft?

12. HELP: How to kill a blocked thread?

 

 
Powered by phpBB® Forum Software