开发者

How can I debug a Windows service that crashes?

开发者 https://www.devze.com 2022-12-29 20:42 出处:网络
I have a .NET Windows service that appears to be crashing due to C0开发者_高级运维0000005 (access violation--according to Dr Watson). When I attach the VS debugger to it--whether I build it with or wi

I have a .NET Windows service that appears to be crashing due to C0开发者_高级运维0000005 (access violation--according to Dr Watson). When I attach the VS debugger to it--whether I build it with or without symbols--the VS debugger just stops when the service crashes, instead of stopping to give me a chance to do any investigation.

  1. Is that to be expected, or am I doing something wrong?
  2. Will using WinDbg let me do something more in real time (obviously, WinDbg lets me do crash dump analysis)?

Thanks!


You should go to the exceptions window (Debug -> Exceptions) and select the Thrown check box for that exception in the Win32 Exceptions. Moreover, pay attention that you are debugging Native Code (see the attached to combo box in the attach to process window.

0

精彩评论

暂无评论...
验证码 换一张
取 消