Remote PHP Debugging and Path Mapping

See Also

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:

  1. Right-click the project's node in the Projects window and open the project's Properties from the context menu.
  2. In the Project Properties dialog, go to the Run Configuration category.
  3. Click the Advanced button. The Advanced Web Configuration dialog opens.
  4. Add the server path and the project path for path mapping.
  5. Under "Debug URL", select one of the following (do not leave the default selected):

  6. 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.

See Also
PHP Breakpoints in the IDE
Starting a Debugging Session

Legal Notices