I have a website running on a remote server, and want to get some information from an exception that is occurring. I can’t install VS or use remote debugging, and have been trying to use various versions of WinDbg with little success. In my local tests, I can get WinDbg to break on a C++ exception, or a CLR exception that I threw, but can’t get much more information than ‘something was thrown’.
Is WinDbg the way to go, or is there another way, or am I screwed for not having adequate logging?
Attach WinDbg to the process, then enter these commands:
The execution will continue (after go command) and will break whenever CLR exception is thrown (or any other unhandled exception). Whenever it breaks on CLR exception you see:
Then you can use SOS commands like
!peto print out exception type,!ClrStackto dump stack,!dsoto dump managed objects in the stack, etc.EDIT: I had typos in
sxeandsxdcommands. Thanks to @MStodd for noticing that.