title: How do I stop the debugger from stepping into Delphi-supplied units?
body: <p>The debugger steps into the source code on errors (like with <kbd>F7</kbd>), but I want to restore the normal working mode where the Delphi basic DCUs (the library) are only compiled into my code, and the sources are not used in debugging.</p>
  
  <p>For example, on an error in my program, the debugger is stepping into Controls.pas, into <code>TControl.Click</code>. The normal case (right after installation) is for Delphi to step over these methods.</p>
  
  <p>Should I recompile Controls.pas without debug information? If so, how?</p>
  
  <hr>
  
  <p>I extending this theme with additional information to better understanding:</p>
  
  <p>We use Delphi6 Prof. what have problem with Mouse (System Error Code 5).
  So we want to recompile to Controls.pas to replace the Mouse Position getter code.
  Then:</p>
  
  <ol>
  <li>I created a folder for it: "c:\D\Common\Delphi_Patches\Delphi_6\"</li>
  <li>I put the original Controls.pas into it.</li>
  <li>I modified the Controls.pas, replaced the position getter code.</li>
  <li>I set the Delphi's Library path, set the first folder to "c:\D\Common\Delphi_Patches\Delphi_6\"</li>
  </ol>
  
  <p>With these steps I can compiled the source with mouse-safe code.</p>
  
  <p>Ok, but then the Delphi everytime steps into Controls.pas on F7, and on any exceptions - this is very "angermaker" thing.</p>
  
  <p>No matter that I removed the "Controls.pas" from the Library path - then the debugger is finding the original "Controls.pas" for it, and opens it... :-(</p>
  
  <p>We don't use "Use Debug DCU-s" in any codes.</p>
  
  <p>I tried to remove "Debug Information" from compiler options, but it is no matter, the Delphi is opens the original Controls.pas...</p>
  
  <p>So I search the way to Delphi don't step into "Controls.pas", but use my dcu...</p>
  
  <p>I hope this provide better context to understand the problem.</p>