title: Activate a breakpoint when an error occurs and when running a PHPUnit test in debugmode
body: <p>In the past I have created serveral <code>C#</code> unit tests, in which I could activate a breakpoint when an specific error occured and when I was running in debugmode. This code was something like this:</p>
  
  <pre><code>if(System.Diagnostics.Debugger.IsAttached)
    System.Diagnostics.Debugger.Break();
  </code></pre>
  
  <p>But now I want to do the same thing in <code>PHPUnit</code> (with <code>Selenium Webdriver</code>). Does anyone knows how to do this? Is it even possible?</p>