Debugging Tools for Windows |
The Exceptions section enables you to customize the actions to be taken when a given exception breaks into the debugger. You can also define new custom exceptions to be monitored.
<!-- options act on all currently defined exceptions -->
<Option> FullDumpOnFirstChance </Option>
<Option> MiniDumpOnSecondChance </Option>
<Option> NoDumpOnFirstChance </Option>
<Option> NoDumpOnSecondChance </Option>
<!-Defining new exceptions -->
<NewException>
<Code> ExceptionCode </Code>
<Name> ExceptionName </Name>
</NewException>
<!-Configuring already defined exceptions -->
<Config>
<Code> { ExceptionCode | AllExceptions } </Code>
<Actions1> Actions </Actions1>
<CustomActions1> CustomActions </CustomActions1>
<Actions2> Actions </Actions2>
<CustomActions2> CustomActions </CustomActions2>
<ReturnAction1> { G | GN | GH | Q | QD } </ReturnAction1>
<ReturnAction2> { G | GN | GH | Q | QD } </ReturnAction2>
</Config>
</Exceptions>
The <Option> tag enables you to set some global behavior options (FullDumpOnFirstChance, MiniDumpOnSecondChance, NoDumpOnFirstChance, and NoDumpOnSecondChance).
The <NewException> tag enables you to define a new exception by providing an exception code and an exception name. ExceptionCode should be a hexadecimal number or a short abbreviation that the debugger knows. ExceptionName should be short and not include spaces.
The following example shows ExceptionCode and ExceptionName.
<Name> My_Custom_Exception </Name>
The <Config> tag enables you to configure the behavior of already defined exceptions. You can configure a given exception by defining its code in the <Code> tag. If you use the AllExceptions keyword, the behavior applies to all defined exceptions. You can also define multiple exception codes separated by semicolons.
<Config> has the following parameters:
The actions can be a set of predefined actions, separated by semicolons.
If you do not want any actions, use the Void keyword.
You can use the following case-sensitive actions:
The following example shows a complete <Config> section.
<Code> AllExceptions </Code>
<Actions1> Log;Stack </Actions1>
<Actions2> Log;MiniDump </Actions2>
<CustomActions2> !runaway </CustomActions2>
<ReturnAction1> GN </ReturnAction1>
<ReturnAction2> Q </ReturnAction2>
</Config>
<Config>
<Code> av </Code>
<Actions1> Log;Stack;MiniDump </Actions1>
<Actions2> Log;Stack;FullDump </Actions2>
</Config>
The first part of this example configures all exceptions to create a log and list the faulting stack for a first chance exception and create a minidump and a log for a second chance. The second part configures the av exception to create a minidump on first chance and a full dump on second chance.