Udostępnij za pośrednictwem


USING ADPLUS SCRIPT TO CAPTURE MEMORY DUMP ON STACKOVERFLOW AND NullReferenceException

It took me some time to figure out how to get appropriate dump on 64 bits boxes using adplus tool. Thought to share out it you:

1) You can use following CFG SCRIPT for capturing dumps StackOverFlow exception

<ADPlus>
<!-- Add log entry, log faulting thread stack and dump full on first chance StackOverflow -->
<Exceptions>
<Config>
<!-- Use sov for stack overflow exception -->
<Code> sov </Code>
<Actions1> Log;Stack;FullDump </Actions1>
<!-- Depending on what you intend - either stop the debugger (Q or QQ) or continue unhandled (GN) -->
<ReturnAction1> GN </ReturnAction1>
< Config>
</Exceptions>
</ADPlus>

Save that as ADP_w3wp_Crash.cfg in location(Default is c:\Program Files\Debugging Tools For Windows)

Run it as :
cscript adplus.vbs –crash -p <ProcessID> -o c:\dumps -c ADP_w3wp_Crash.cfg

2) Use the following cfg file for capturing dump on NullReferenceException

<ADPlus>
<!-- Add log entry, log faulting thread stack and dump full on first chance StackOverflow -->
<Exceptions>
<Config>
<!-- Use av for NullReferencException-->
       <Code> av </Code>
<Actions1> Log;Stack;FullDump </Actions1>
<!-- Depending on what you intend - either stop the debugger (Q or QQ) or continue unhandled (GN) -->
<ReturnAction1> QD </ReturnAction1>
< Config>
</Exceptions>
</ADPlus>

Save that as ADP_w3wp_Crash.cfg in location(Default is c:\Program Files\Debugging Tools For Windows)

Run it as :
cscript adplus.vbs –crash -p <ProcessID> -o c:\dumps -c ADP_w3wp_Crash.cfg

 

Happy debugging