Path Mapping In PHP Debugger
By Radek Matous on Apr 02, 2009
In this entry I would like to announce manual Path Mapping for remote debugging. Since NB6.5 it has been 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 isn't the same as the file opened in NetBeans IDE running on a local machine. Debugger support in NetBeans must thus be able to map server paths to local paths, take into account that the server and client might run on different OS platform, cannot rely that the initially debugged file is really the debugged one because of rewrite rules, prepend files... Many more factors could be mentioned here but it means that path mapping cannot be resolved automatically for every individual scenario. That's the reason why for 6.7 we added the possibility to manually define path mapping through project setup for individual run configurations. In the next screenshot is a declaration for mapping from a Windows server path to a Linux local path.
Together with manual path mapping, two additional choices were added. The first one, "Ask Every Time," lets you choose the URL yourself just before the debugging session is started (see next screenshot). The second one, "Do Not Open Web Browser," only starts the debugging session and expects you to open your web browser and browse the URL yourself - anyway GET (or POST) variable XDEBUG_SESSION_START is needed.