-
Open the Run/Debug Configuration dialog box by doing one of the following:
- On the main menu, choose .
- Press Alt+Shift+F10Alt+Shift+F10, then press 00 to display the Edit Configuration dialog box or select the configuration from the pop-up window and press F4F4.
-
Click
on the toolbar or press InsertInsert. From the drop-down list, select the PHP Web Application configuration type.
The PHP Web Application dialog box opens.
- Specify the configuration name.
-
Choose the applicable debug server configuration from the Server drop-down list
or click the Browse button
and define a debug server configuration in the Servers dialog box that opens.
-
In the Start URL text pox, type the server path to the file that implements the application starting page.
Specify the path relative to the server configuration root.
Note
The read-only field below shows the URL address of the application starting page. The URL address is composed dynamically as you type.
-
Specify the browser to open the application in. Choose a configured browser from the Browser drop-down list
or click the Browse button
and specify another browser in the Web Browsers dialog box that opens.
- To have the debugging engine stop as soon as connection between it and IntelliJ IDEA is established (instead of running automatically until the first breakpoint is reached), select Stop at first line check box.
-
Open the Servers dialog box by doing one of the following:
- Choose for Windows and Linux or for Mac OS. Then click Servers under the PHP node.
-
In the Run/Debug Configuration: PHP Web Application dialog box,
click the Browse button
next to the Server drop-down list.
- Specify the server configuration name.
- Specify the host where the application is run and the port to access it.
- From the Debugger drop-down list, choose the debugging engine to use.
-
Specify how the IntelliJ IDEA will set up a correspondence between files on the server and their local copies. Based on these mappings,
IntelliJ IDEA will open local copies of currently processed files.
-
To have IntelliJ IDEA suggest mappings itself, clear the Use path mappings check box.
When you start a debugging session, IntelliJ IDEA will try to detect the local copies of the application files on the server.
The suggestions are displayed in a dialog box where IntelliJ IDEA asks you to confirm or edit suggested mappings.
Tip
IntelliJ IDEA detects mappings 100% correctly if the application is deployed to the server root and the folder structure on the server is identical with the folder structure under the project root.
- To specify correspondence between files on the server and their local copies manually, select the Use path mappings check box and map files and folders on the server to their local copies.
-
To have IntelliJ IDEA suggest mappings itself, clear the Use path mappings check box.
When you start a debugging session, IntelliJ IDEA will try to detect the local copies of the application files on the server.
The suggestions are displayed in a dialog box where IntelliJ IDEA asks you to confirm or edit suggested mappings.

