title: Why does the LLDB Debugger constantly fail to attach?
body: <p>I have seen a lot of answers for this question:</p>
  
  <blockquote>
    <p>error: failed to attach to process ID</p>
  </blockquote>
  
  <p>as <strong><code>switch to GDB</code></strong>. But no one addresses the reason of <strong>why</strong> it happens?</p>
  
  <p>Attaching works fine with the GDB debugger but the default and recommended project setting is LLDB.</p>
  
  <p>Can anybody explain why LLDB fails? Is it a common bug or am I doing something wrong?</p>
  
  <p>Alternatively, how can I set GDB as my default debugger without changing it manually when creating the new projects?</p>
  
  <p>System Info:</p>
  
  <pre><code>OS: Lion
  RAM: 5GB
  XCode: Version 4.6 (4H127)
  Device: Mac mini
  </code></pre>
  
  <p>My localhost setting:
  <img src="https://i.stack.imgur.com/vE8mm.png" alt="enter image description here"></p>