9

I am developing a .Net 2.0 application in which a StackOverflowException occurs. Is there a way to print/log the stack trace before/during the application aborts? This is a long running server-side process which would be hard to execute under a debugger. I know that StackOverflowException can not be caught.

2
  • Does it generate a crash dump when it crashes? If so this might help blogs.msdn.com/tess/archive/2008/03/31/… Commented Apr 7, 2010 at 9:58
  • Also you don't say what kind of application. If it is a web application I think you need to use the IIS Debug toolkit (although I don't know about IIS7) Commented Apr 7, 2010 at 10:38

1 Answer 1

4

Use ADPlus (from Windows Debugging Tools) to force a dump on crash.

E.g.

adplus -hang -pn <process name> -o <dump file>
Sign up to request clarification or add additional context in comments.

1 Comment

CW: Feel free to expand this with specifics (which I don't have to hand). While this doesn't cover the "before the application aborts" criterion, I don't think that is possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.