title: Expected LdrDoDebuggerBreak(), got NtWaitForWorkViaWorkerFactory()
body: <p>During a debugging workshop, one of the participants could not follow an example.</p>
  
  <p>When running an executable under WinDbg 10.0.15603.137 on his Windows 10 machine, the debugger was breaking the first time at <code>NtWaitForWorkViaWorkerFactory()</code> instead of the initial breakpoint in <code>LdrDoDebuggerBreak()</code>.</p>
  
  <p>When trying to run the executable with <code>g</code>, it says that there's no debugee to run. What could the problem have been?</p>
  
  <p>Here's what it looked like:</p>
  
  <p><a href="https://i.stack.imgur.com/Tg6IJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tg6IJ.png" alt="Screenshot"></a></p>
  
  <p>The source code of the application is trivial:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;exception&gt;
  
  int _tmain(int /*argc*/, _TCHAR* /*argv*/[])
  {
      throw std::exception();
  }
  </code></pre>
  
  <p>Note: I'll hardly be able to provide additional information, since I have no more access to the customer's PC and it doesn't happen on mine.</p>