title: How to get Netbeans PHPUnit code coverage working on Windows?
body: <p>I am trying to get Netbeans <a href="http://netbeans.org/kb/docs/php/phpunit.html#code-coverage" rel="noreferrer">code coverage checking</a> feature working. I am working with PHP on a Windows XAMPP setup, and have setup PHPUnit which seems to work fine for running unit tests.</p>
  
  <p>When I right-click my project and select "Code Coverage > Collect and Display Code Coverage", it displays a little bar at the bottom that says "0%" and has options to run tests and get a report.</p>
  
  <p>I run the tests and check the report, yet it remains at 0%. If I check the report it says "No data - have you run your code yet?" I've tried rerunning the tests but it still does this. I've also tried just running the project, and also "debugging" the project to no avail.</p>
  
  <p>Recent information on the topic is hard to come by, but judging by the PHPUnit documentation there <a href="http://www.phpunit.de/manual/3.0/en/code-coverage-analysis.html" rel="noreferrer">could be an issue with Xdebug</a> (I've enabled it, but no idea if it is working properly as I've not used it from within Netbeans before). Some old sources say that there are two php.ini's in Xampp (one for web, one for CLI), but I can't find a second one (guessing this has since changed).</p>
  
  <p>I'm sure I am probably missing something fairly basic like an Xdebug setting or something... any help?</p>
  
  <p>Here's the XDebug section from my php/php.ini file:</p>
  
  <pre><code>[XDebug]
  zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
  ;xdebug.profiler_append = 0
  ;xdebug.profiler_enable = 1
  ;xdebug.profiler_enable_trigger = 0
  ;xdebug.profiler_output_dir = "\xampp\tmp"
  ;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
  xdebug.remote_enable = 1
  xdebug.remote_handler = "dbgp"
  xdebug.remote_host = "127.0.0.1"
  ;xdebug.trace_output_dir = "\xampp\tmp"
  </code></pre>