I'm testing an application running on IIS using AppVerifier/WinDbg/cdb. Basically the schema is as follows: when IIS starts cdb attaches to the process and creates a named-pipe, then I use WinDbg to connect to the pipe. Then I run thousands of test cases against the application and wait until AppVerifier throws something.
Problems/Questions:
Thanks.
You can use the sxe command (or other sx* commands) to have WinDbg run a command when an exception is hit. For a trivial example, this prints "Hello, world: " when a module is loaded:
sxe -c ".printf \"Hello, world: \"" ld
You might think to combine this with the .beep command, but this results in a syntax error. I think that might be related to the note in the .beep help that says "This command cannot be used in script files." However, you should be able to use .shell to do something useful.
I haven't tried it, but perhaps it is possible to hack around your reconnection problem using the sx* commands to trap the "process exit" event. Or maybe you could have the cdb instance that is started with IIS notify you when an exception occurs, so that you can then connect to it using WinDbg?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With