How can I abort a long operation in WinDbg?
Asked Answered
J

4

77

Often WinDbg will enter a state where it is *Busy* performing an operation.

Often this is due to some mistake I made trying to dt some_variable_itll_never_find or setting a break point somewhere without symbols or the 1000's of other mistakes I make fumbling around this tool.

Is there a way to cancel the current operation?

Jamajamaal answered 10/10, 2008 at 13:20 Comment(3)
Say, are you sure that CRTL+Break actually does abort the currently running command? I can't remember a single instance where it worked for me (I always had to wait for the command to complete).Maculation
@MartinBa I'm not sure it always works, but it sometimes does.Jamajamaal
Funnily enough I had to use WinDbg during the last days and when I used it on a long running !locks command it did work. Maybe it's some version thing, I think the one where it didn't work was v6 that I still had installed on one dev machine (vs. the current v12 that I used last week).Maculation
B
89

I don't have the tool now, but as far as I remember it should be Ctrl+Break.

Badr answered 10/10, 2008 at 13:51 Comment(3)
Thanks! Seems like this key combo doesn't work on on the Virtual PC I was using - which is why I dismissed this suggestion when I found something on Google about it. Seems fine on my "real" PC.Jamajamaal
Using the menu: Debug -> Break (for some reason the keyboard shortcut wasn't working for me)Ashleaashlee
Many laptops don't have a break key. Also @OhadSchneider how about the new WinDbg Next? There's no Debug -> Break menu.Tizes
T
24

Sometimes Ctrl+Break doesnt work. At that point you may use Debug menu -> Break.

Thanks

Telson answered 1/4, 2012 at 17:23 Comment(0)
D
13
Ctrl+Break 

will forcibly Debug break all but if for instance you entered some windbg command that takes a long time and you want to kill that then you should enter

Ctrl+c

This will kill the current running command.

Dahlberg answered 6/3, 2012 at 0:25 Comment(0)
G
6

You probably had "http://msdl.microsoft.com/download/symbols" in the symbol path. Windbg will try to locate all your PDBs on Microsoft site :-(.
Pressing Ctrl+Break is not fast enough. What I usually do is to unplug the network cable, until Windbg wakes up. Just be carfull, if Windbg was realy downloading one if its OS DLL, the DLL gets curropted. You will need .reload /o to fix that DLL. I only unplug when I know all OS DLL were already downloaded.

To avoid this delay in the first place, uncheck "Resolve Unqualified Symbols" found under the "Debug" menu.

Gneiss answered 12/10, 2008 at 12:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.