IntelliJ IDEA 12.1.0 Web Help

Some features described here are available in Ultimate edition only.

A PHP Web Application debug configuration tells IntelliJ IDEA where the PHP application to debug is deployed, the URL address to access the starting page of the application, the browser to open the starting page in, and the correspondence between files and folders deployed on the server and their local copies (mappings).

To create a PHP Web Application debug configuration
  1. Open the Run/Debug Configuration dialog box by doing one of the following:
    • On the main menu, choose Run | Edit Configurations.
    • 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.
  2. Click add.png 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.
  3. Specify the configuration name.
  4. Choose the applicable debug server configuration from the Server drop-down list or click the Browse button browseButton.png and define a debug server configuration in the Servers dialog box that opens.
  5. 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.

  6. Specify the browser to open the application in. Choose a configured browser from the Browser drop-down list or click the Browse button browseButton.png and specify another browser in the Web Browsers dialog box that opens.
  7. 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.
To define a debug server configuration
  1. Open the Servers dialog box by doing one of the following:
    • Choose File | Settings for Windows and Linux or IntelliJ IDEA | Preferences for Mac OS. Then click Servers under the PHP node.
    • In the Run/Debug Configuration: PHP Web Application dialog box, click the Browse button browseButton.png next to the Server drop-down list.
  2. Specify the server configuration name.
  3. Specify the host where the application is run and the port to access it.
  4. From the Debugger drop-down list, choose the debugging engine to use.
  5. 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.

See Also

Procedures:

Reference:

Web Resources: