title: STATUS_SINGLE_STEP in Visual Studio
body: <p>I am trying to add a <code>VEH handler</code> in my code, and in it, upon first <strong>STATUS_ACCESS_VIOLATION</strong>, I set the Trace bit to 1 by setting the <code>exc-&gt;ContextRecord-&gt;EFlags |= 0x100</code> so as to single step the violation.<br/><br/> I see that the handler is getting called for <strong>ACCESS_VIOLATION</strong> but never getting called with <code>exc-&gt;ExceptionRecord-&gt;ExceptionCode == STATUS_SINGLE_STEP</code> after stepping over the offending code.</p>
  
  <p>I am suspecting that the debugger is removing the 0x100 from <code>the EFlags</code> when it runs its handler. If I run in a command prompt, I see that it is getting hit. Is there anyway I can make the debugger not alter the trace flag and allow my handler to get called with <code>ExceptionCode = STATUS_SINGLE_STEP</code>?</p>
  
  <p>thanks</p>