On this page:
- What is a remote web server?
- How do I synchronize my application sources on the server with their local copies in my PhpStorm project?
- Debugging an application
- Configuring mappings
What is a remote web server?
How do I synchronize my application sources on the server with their local copies in my PhpStorm project?
To debug an application on a remote web server, you need to have the copies of its sources in a PhpStorm project. To synchronize local and remote sources, create a deployment configuration as described in Creating a Remote Server Configuration and Configuring Synchronization with a Web Server.
Debugging an application
- Choose the newly created configuration in the Select run/debug configuration drop-down list on the tool bar and click the Debug toolbar button . The HTML file specified in the run configuration opens in the chosen browser and the Debug tool window appears.
- In the Debug tool window, proceed as usual: step through the program, stop and resume the program execution, examine it when suspended, view actual HTML DOM, etc.
Suppose you have a simple application that consists of an
index.html file and a
Now we can start debugging: choose the new run/debug configuration from the drop-down list in the upper right-hand corner of the PhpStorm window, and then click to the right of the list:
- When your application is deployed and running on a remote web server.
- When you have defined several resource root folders in addition to the project root.
In most cases, PhpStorm sets path mappings automatically by reusing mappings from the deployment configuration. If your application structure is complicated, additional manual configuration is required.
- In the Remote URLs of local files area, map the files and folders to URL addresses of files and folders on the server according to the currently used deployment configuration, see Mapping local folders to folders on the server and the URL addresses to access them.