title: Debugger.Launch not working
body: <p>I am currently trying to launch a debugger for a process that is launched externally (not from within visual studio). I cannot seem to get a debugger actually launch, as it appears nothing happens. In the process, I added this code:</p>
  
  <pre><code>Debug.Assert(Debugger.IsAttached == false, "Should be no debugger");
  if (!Debugger.IsAttached)
  {
      Debug.Assert(Debugger.Launch(), "Debugger not launched");
  }
  Debugger.Break();
  Debug.Assert(Debugger.IsAttached == true, "Debugger should be attached");
  </code></pre>
  
  <p>The asserts are there to verify that I'm not crazy. At first, the <em>IsAttached</em> property returns false as I expect. I then call <em>Debugger.Launch</em>, and that returns <strong>true</strong>. As per the MSDN documentation of <em>Debugger.Launch</em>, it says it will only return true if it succeeds in launching the debugger, or if one is already attached. I verified one was not attached, so it must have launched one.</p>
  
  <p>The break-point never gets hit, and the second verify fails (the <em>IsAttached</em> property returns false). I also attempted to put a sleep in after <em>Debugger.Launch</em> to give it some time, to no avail.</p>
  
  <p>Any suggestions?</p>