调试器-指向异常位置

昨天在调试一个unit test的时候,使用VS调试启动unit test,跳出错误框:

First-chance exception at 0x74FAC41F (KernelBase.dll) in ××××.exe: 0x04242420 (parameters: 0x31415927, 0x5D250000, 0x0033F418).

If there is a handler for this exception, the program may be safely continued.

此时Call Stack:

  clr.dll!_EEDllUnregisterServer@4() Unknown
  clr.dll!EEStartupHelper(enum tagCOINITEE) Unknown
  clr.dll!EEStartup(enum tagCOINITEE) Unknown
  clr.dll!EnsureEEStarted(enum tagCOINITEE) Unknown
  clr.dll!PrepareExecuteDLLForThunk(struct HINSTANCE__ *,unsigned long,void *) Unknown
  clr.dll!CorDllMainForThunk(struct HINSTANCE__ *,struct HINSTANCE__ *) Unknown
  mscoreei.dll!CorDllMainWorkerForThunk(struct HINSTANCE__ *) Unknown
  mscoreei.dll!_VTableBootstrapThunkInitHelper@4() Unknown
  mscoreei.dll!_VTableBootstrapThunkInitHelperStub@0() Unknown

貌似是一个managed dll触发的异常。调试的代码本身是native,但unit test目标代码是managed + native +ATL.

发现此时调试器设置为 Auto,并且捕获Exception里面我已经选中了Win32 Exceptions。

结论是,当调试器选中debugger Type,面对的是managed+native code时,此时抛出异常,被调试器本身捕获。

 

 

posted on 2014-04-10 16:02  Tongxuan  阅读(340)  评论(0)    收藏  举报