title: How to debug "This application has requested the Runtime to terminate it in an unusual way." when I can't even step in the code?
body: <p>I have a C++ program that is giving this error as soon as the process starts - apparently before any user code executes. It only happens when inlining is enabled. Even with debug symbols built in, I can't step in the code. As soon as I press F10 in Visual Studio I get the error and the program stops. I checked all exceptions/checks in "Debug/Exceptions" but still don't get a break.</p>
  
  <p>Normally I would expect something like this to be due to a missing runtime dependency but I'm quite positive that's not the case here (verified with Dependency Walker).</p>
  
  <p>edit: I used Steve Townsend's recommendation of CDB and now I'm able to step through the pre-user-code parts of the program. The final stack trace is:</p>
  
  <pre><code>Child-SP          RetAddr           Call Site
  00000000`0008e308 00000000`7541601a ntdll!ZwTerminateProcess+0xa
  00000000`0008e310 00000000`7540cf87 wow64!Wow64EmulateAtlThunk+0x86ba
  00000000`0008e340 00000000`7539276d wow64!Wow64SystemServiceEx+0xd7
  00000000`0008ec00 00000000`7540d07e wow64cpu!TurboDispatchJumpAddressEnd+0x24
  00000000`0008ecc0 00000000`7540c549 wow64!Wow64SystemServiceEx+0x1ce
  00000000`0008ed10 00000000`7776ae27 wow64!Wow64LdrpInitialize+0x429
  00000000`0008f260 00000000`777672f8 ntdll!LdrGetKnownDllSectionHandle+0x1a7
  00000000`0008f760 00000000`77752ace ntdll!RtlInitCodePageTable+0xe8
  00000000`0008f7d0 00000000`00000000 ntdll!LdrInitializeThunk+0xe
  </code></pre>