Debugging Tools for Windows |
The following sample shows you how to configure ADPlus for custom exceptions.
<!-- Configuring ADPlus for custom actions on a given CLR exception -->
<!-- First we load sos extension -->
<!-- Next we use the !cce command to check if the exception is the one we are looking for -->
<!-- Next we use a j command on $t1 to do what we want -->
<!-- Replace UnhandledException_Console.MyCustomException below with the name of the exception you are looking for -->
<!-- You need to put the GN in the two branches of the j command and use VOID in the ReturnACtion1 tag -->
<Exceptions>
<Config>
<!-- This is for the CLR exception -->
<Code> clr </Code>
<Actions1> Log </Actions1>
<CustomActions1> !cce UnhandledException_Console.MyCustomException 1; j ($t1 = 1) '.dump /ma /u c:\Dumps\MyCustom.dmp;gn' ; 'gn' </CustomActions1>
<ReturnAction1> VOID </ReturnAction1>
</Config>
</Exceptions>
</ADPlus>