To get Netbeans to listen for browser initiated debug sessions please consider the following steps:

  1. Go to Project Properties > Run Configuration > Advanced > Debug URL and choose the Do not open a web browser.  Save.  (you may like to setup Path Mapping, but it works for me without it)
  2. In the projects listing right click on your intended project and choose Debug, which will start Netbeans listening for connections.
  3. In your web browser you can now access your website http://www.example.org?XDEBUG\_SESSION\_START=netbeans-xdebug
  4. You will now see the debug information appear in the debug log area of Netbeans.

(Para-phrased and expanded upon an answer on StackOverflow)