Discussion:
Noninvasive Debugging (ending debug session kills my application)
(too old to reply)
Jean Stax
2004-04-05 19:05:17 UTC
Permalink
Hi !

According to the MS docs, one of the major advantages of Noninvasive
Debugging in WinDbg is that you may end debug session, while your
application continues to run.
I run Windows 2000 and stop my debugging by pressing Debug | Stop
Debugging menu command. However, my application is stopped (killed) as
well (like in standard Attach Process).

Do I miss something ?

Jean
mikeb
2004-04-05 19:55:52 UTC
Permalink
Post by Jean Stax
Hi !
According to the MS docs, one of the major advantages of Noninvasive
Debugging in WinDbg is that you may end debug session, while your
application continues to run.
I run Windows 2000 and stop my debugging by pressing Debug | Stop
Debugging menu command. However, my application is stopped (killed) as
well (like in standard Attach Process).
Support for detaching from a process without killing it requires XP or
Win 2003 Server.
--
mikeb
unknown
2004-04-06 00:46:27 UTC
Permalink
Post by mikeb
Post by Jean Stax
According to the MS docs, one of the major advantages of Noninvasive
Debugging in WinDbg is that you may end debug session, while your
application continues to run.
I run Windows 2000 and stop my debugging by pressing Debug | Stop
Debugging menu command. However, my application is stopped (killed) as
well (like in standard Attach Process).
Support for detaching from a process without killing it requires XP or
Win 2003 Server.
But this is *not* the same thing as non-invasive debugging.

If you attached non-invasively (using -pv command line option or
"non-invasive" checkbox in the UI) then you can detach without killing the
process using 'qd' command. This works even on Win2K.
Jean Stax
2004-04-06 08:44:27 UTC
Permalink
Thanks, but still it sounds a little odd...
In "Noninvasive Debugging" chapter we find the following paragraph:
Noninvasive debugging is useful if you do not want to terminate the
target at the end of the session, and the target is running on Windows
NT or Windows 2000. (These operating systems do not support detaching
from a target that the debugger has actually attached to.) It is also
useful if the target application is completely frozen and cannot
launch the break thread necessary for a true attach.

At the same time in "QD" chapter we have the following commnets:
The QD command will detach from the target application and end the
debugging session, leaving the target still running. However, this
command is only supported on Windows XP and Windows Server 2003. On
Windows NT® and Windows 2000, it will generate a warning message and
have no effect.

In fact, on my Win2000 QD command didn't work....("Current target
doesn't support detach").

Thanks.
Jean
Post by unknown
Post by mikeb
Post by Jean Stax
According to the MS docs, one of the major advantages of Noninvasive
Debugging in WinDbg is that you may end debug session, while your
application continues to run.
I run Windows 2000 and stop my debugging by pressing Debug | Stop
Debugging menu command. However, my application is stopped (killed) as
well (like in standard Attach Process).
Support for detaching from a process without killing it requires XP or
Win 2003 Server.
But this is *not* the same thing as non-invasive debugging.
If you attached non-invasively (using -pv command line option or
"non-invasive" checkbox in the UI) then you can detach without killing the
process using 'qd' command. This works even on Win2K.
Ivan Brugiolo [MSFT]
2004-04-06 15:35:11 UTC
Permalink
From cdb.exe you can use the 'q' command.
It will un-suspend the target process and close the debugger.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Post by Jean Stax
Thanks, but still it sounds a little odd...
Noninvasive debugging is useful if you do not want to terminate the
target at the end of the session, and the target is running on Windows
NT or Windows 2000. (These operating systems do not support detaching
from a target that the debugger has actually attached to.) It is also
useful if the target application is completely frozen and cannot
launch the break thread necessary for a true attach.
The QD command will detach from the target application and end the
debugging session, leaving the target still running. However, this
command is only supported on Windows XP and Windows Server 2003. On
Windows NT® and Windows 2000, it will generate a warning message and
have no effect.
In fact, on my Win2000 QD command didn't work....("Current target
doesn't support detach").
Thanks.
Jean
Post by unknown
Post by mikeb
Post by Jean Stax
According to the MS docs, one of the major advantages of Noninvasive
Debugging in WinDbg is that you may end debug session, while your
application continues to run.
I run Windows 2000 and stop my debugging by pressing Debug | Stop
Debugging menu command. However, my application is stopped (killed) as
well (like in standard Attach Process).
Support for detaching from a process without killing it requires XP or
Win 2003 Server.
But this is *not* the same thing as non-invasive debugging.
If you attached non-invasively (using -pv command line option or
"non-invasive" checkbox in the UI) then you can detach without killing the
process using 'qd' command. This works even on Win2K.
unknown
2004-04-06 20:24:01 UTC
Permalink
Sorry, this should have been 'q' not 'qd'. I just tried it on Win2K
and it worked - windbg detached and the process continued running.

I agree that it's somewhat strange that Stop Debugging or just closing
the debugger doesn't do this automatically.
Post by Jean Stax
Thanks, but still it sounds a little odd...
Noninvasive debugging is useful if you do not want to terminate the
target at the end of the session, and the target is running on Windows
NT or Windows 2000. (These operating systems do not support detaching
from a target that the debugger has actually attached to.) It is also
useful if the target application is completely frozen and cannot
launch the break thread necessary for a true attach.
The QD command will detach from the target application and end the
debugging session, leaving the target still running. However, this
command is only supported on Windows XP and Windows Server 2003. On
Windows NT® and Windows 2000, it will generate a warning message and
have no effect.
In fact, on my Win2000 QD command didn't work....("Current target
doesn't support detach").
Post by unknown
But this is *not* the same thing as non-invasive debugging.
If you attached non-invasively (using -pv command line option or
"non-invasive" checkbox in the UI) then you can detach without killing the
process using 'qd' command. This works even on Win2K.
Loading...