IntelliJ IDEA 12.1.0 Web Help

11.0.0.+

Besides debugging the entire application, you can debug separate HTTP Requests. This is helpful when you are actually interested in a specific page that is accessed in a number of steps, but for this or that reason you cannot specify this page as the start page for debugging, for example, because you need to "come" to this page with certain data.

Debugging PHP HTTP requests in IntelliJ IDEA is supported through the PHP HTTP Request run configuration.

To debug a specific php http request
  1. Define a debug configuration of the type PHP HTTP Request. Based on the configuration settings, IntelliJ IDEA composes the request to run.
  2. In the file, that implements the page in question, set the breakpoints, where necessary.
  3. Click the Debug button debug.png on the toolbar.
  4. Examine the application as soon as the debugger suspends on reaching the first breakpoint.
  5. To control the program execution manually, step through the code using menu commands or toolbar buttons.
  6. To have the program run automatically up to the next breakpoint, resume the session.
To create a php http request debug configuration
IntelliJ IDEA agglutinates the settings specified in this configuration into a PHP HTTP request.
  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 HTTP Request configuration type. The PHP HTTP Request dialog box opens.
  3. Specify the configuration name.
  4. In the Server drop-down list, specify the debug server configuration to interact with the Web server where the application is executed. Select one of the existing configurations or click the Browse button browseButton.png and define a debug server configuration in the Servers dialog box that opens.
  5. In the URL text box, complete the host element of the request to debug. Type the path relative to the host specified in the debug server configuration. As you type, IntelliJ IDEA composes the URL address on-the-fly and displays it below the text box.
  6. Specify whether you want to bring any data to the target page. From the Request method drop-down list, choose the relevant request type:
    • To access the page without bringing any data, choose GET.
    • To access the page with some data saved in variables, choose POST and type the relevant variables in the Request body text box.
  7. In the Query text box, type the query string of the request. This string will be appended to the request after the ? symbol.
  8. Click OK, when ready.

See Also

Procedures:

Reference:

PHP Support:

Web Resources: