!for_each_thread
The !for_each_thread extension executes the specified debugger command once for each thread in the target.
!for_each_thread ["CommandString"]
!for_each_thread -?
Parameters
CommandString
Specifies the debugger commands to be executed for each thread. If CommandString includes multiple commands, separate them with semicolons (;) and enclose CommandString in quotation marks ("). If CommandString is enclosed in quotations marks, the individual commands within CommandString cannot contain quotation marks. Within CommandString, @#Thread is replaced by the thread address.
-?
Displays help for this extension in the Debugger Command window.
DLL
This extension works only in kernel mode, even though it resides in Ext.dll.
Windows 2000 |
Ext.dll |
Windows XP and later |
Ext.dll |
Additional Information
For more general information about threads, see Threads and Processes. For more information about manipulating or obtaining information about threads, see Controlling Processes and Threads.
Remarks
If no arguments are supplied, the debugger displays a list of all threads, along with thread wait states. This is equivalent to entering !thread @#Thread 2 as the CommandString value.
You can terminate execution at any point by pressing CTRL+BREAK (in WinDbg) or CTRL+C (in KD).
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for