title: XCode doesn't break in #include'd CPP files
body: <p>If you include a CPP file from another CPP file, XCode refuses to break at any breakpoints in the included CPP file. I'm going to raise a bug with Apple but just wanted to mention it here in case others have come across this and have maybe found ways around it.</p>
  
  <p>There are very good reasons that you may want to include CPP files from CPP files which I won't go into here. Suffice to say, I can't simple re-arrange the project to compile the included files directly.</p>
  
  <p>Example: A very simple iPhone project</p>
  
  <p><strong>main.mm</strong></p>
  
  <pre><code>extern void FunctionInSource1( int a );
  
  int main(int argc, char * argv[])
  {
      FunctionInSource1( 1 );
  
      return 0;
  }
  </code></pre>
  
  <p><strong>source1.cpp</strong></p>
  
  <pre><code>#include "source2.cpp"
  
  void FunctionInSource1( int a )
  {
      int b = a;
  
      FunctionInSource2( b );
  
      return;
  }
  </code></pre>
  
  <p><strong>source2.cpp</strong></p>
  
  <pre><code>void FunctionInSource2( int b )
  {
      int c = b;
  
      c = c + 1;
  
      return;
  }
  </code></pre>
  
  <p>main.mm and source1.cpp are members of the target, i.e. they are set to build. source2.cpp is NOT a member of the target and is NOT compiled except through its inclusion in source1.cpp</p>
  
  <p>Setting a breakpoint anywhere in source2.cpp fails to trigger. Breakpoints anywhere else work fine. N.B. You can still step into source2.cpp from source1.cpp for example, just not break directly in source2.cpp</p>
  
  <p>If anyone has come up with a solution I'd be very happy to hear about it.</p>
  
  <p>Max</p>