It is possible to debug both scripts and web pages, and web pages can be
debugged either locally or remotely. For Remote Debugging, unfortunately the
debugged php file on the remote server is not the same as the file opened in
the IDE running on a local machine. Debugger support in the IDE must thus
be able to map server paths to local paths. However, due to many complications,
path mapping cannot be resolved automatically for every individual scenario.
Therefore, you must manually define path mapping through
the project setup for individual run configurations. You can also specify the
proxy server, if any, and the URL at which the debugging session starts. If you do
not specify this URL, debugging starts at your index file.
To set up path mapping and enable custom debugging URLs:
Right-click the project's node in the Projects window and open the project's Properties from the context menu.
In the Project Properties dialog, go to the Run Configuration category.
Click the Advanced button. The Advanced Web Configuration dialog opens.
Add the server path and the project path for path mapping.
Under "Debug URL", select one of the following (do not leave the default selected):
Ask Every Time, which has the IDE prompt you for the URL when you start a debugging session.
Do
Not Open Web Browser, which requires you to open the browser and enter
the URL manually (you need the GET/POST XDEBUG_SESSION_START variable).
If you are using a proxy server for debugging, enter the server's host name and port in the Debugger Proxy section.
For more information, please see the following post in the NetBeans for PHP blog.