File | Settings | Languages and Frameworks | PHP | Debug for Windows and Linux

IntelliJ IDEA | Preferences | Languages and Frameworks | PHP | Debug for OS X

⌘, or ⌘,⌘, or ⌘,⌘, or ⌘,⌥ F7, ⌥F7 or ⌥F7^ ⌥ S, ⌃⌥S or ⌃⌥S

settings

The page is available only when the PHP plugin is enabled. The plugin is not bundled with IntelliJ IDEA, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.

Use this page to configure the behaviour of the Xdebug and Zend Debugger debugging tools.

ItemDescription
Evaluation
  • Show array and object children in Debug Console: Select this check box to show the output for arrays and objects in the Debug Tool Window. Console. The output will be wrapped in the var_export() function.
  • Safe evaluation mode in value hints and Watches Frame:
    • When this check box is selected, IntelliJ IDEA checks that the expression or code fragment to be evaluated does not contain any undefined elements and informs you about any discrepancies detected.
    • If the check box is cleared, an exception appears if IntelliJ IDEA encounters any undefined elements during evaluation.
    See Evaluating Expressions for details.
Local debug In this area, customize local debugging, when the processed files are on your machine.
  • Pass required configuration options through command line (still need to enable debug extension manually): select this check box to have debugger configuration options passed through a command line.
External Connections In this area, specify how you want IntelliJ IDEA to treat connections received from hosts and through ports that are not registered as server configurations.
  • Ignore external connections through unregistered server configurations: Select this check box to have IntelliJ IDEA ignore connections received from hosts and through ports that are not registered as server configurations. When this check box is selected, IntelliJ IDEA does not attempt to create a server configuration automatically.
  • Detect path mappings from deployment configurations:
    • When this check box is selected, IntelliJ IDEA attempts to retrieve path mappings for debugging in a remote environment from the server access configuration (deployment configuration).
    • When the check box is cleared, you have to specify the path mappings manually.
    See Validating the Configuration of a Debugging Engine, Web Server Debug Validation Dialog, and Configuring Remote PHP Interpreters for details.
  • Max. simultaneous connections: use this spin box to limit the number of external connections that can be processed simultaneously.
Xdebug Use the controls in this area to configure debugging using the Xdebug tool.
  • Debug port: in this text box, specify the port for IntelliJ IDEA and the Xdebug engine to communicate through. This must be exactly the same port number as specified in the php.ini file:
    xdebug.remote_port = <port_number>
                          

    By default, Xdebug listens on port 9000.

  • Can accept external connections: select this check box to enable IntelliJ IDEA to accept any incoming connections from Xdebug engines through the port specified in the Debug port text box.
  • Force break at first line... The status of the Force break at the first line when no path mapping is specified and Force break at the first line when the script is outside the project check boxes affects a debugging session when the debugger is configured on a remote server, see Configuring Synchronization with a Web Server.
    • When a check box is selected, the path mappings are checked before a debugging session starts. If no path mappings are detected, an error message is displayed and the debugger stops at the first line instead of at the first breakpoint.
    • When a check box is cleared, the path mappings are checked only during a debugging session, as soon as the first breakpoint is hit. If no path mappings are specified, IntelliJ IDEA displays the corresponding error message.
Zend DebuggerUse the controls in this area to configure debugging using the Zend Debugger tool.
  • Debug port: In this text box, specify the port for IntelliJ IDEA and the Zend Debugger engine to communicate through. Type the port number within the tunnel specified in the php.ini file through zend_debugger.tunnel_min_port and zend_debugger.tunnel_max_port. For details, see http://files.zend.com/help/previous-version/Zend-Server-4-Community-Edition/zenddebugger.html
  • Can accept external connections: Select this check box to enable IntelliJ IDEA to accept any incoming connections from Zend Debugger engines through the port specified in the Debug port text box.
  • Settings broadcasting port: In this text box, specify the port through which the debugger settings are passed to the debugging toolbar in the browser.
  • Ignore Z-Ray system requests: Select this check box to block requests from the Z-Ray system if they annoy you by invoking the IntelliJ IDEA debugger too often.

If starting the Zend Debugger tool fails with the message "Port is busy", specify a port number of your choice higher than 10000.

Use debugger bookmarklets to initiate debugger from your favorite browser Follow this link to open the Zend Debugger & Xdebug bookmarklets page where you can generate bookmarklets through which you will start/stop a debugging session by controlling the debugger cookie.
Advanced Settings Notify if debug session was finished without being stopped: Select this check box to have IntelliJ IDEA display a notification when no breakpoints are hit during Zero-Configuration debugging. This may happen if the path mappings are not configured or configured erroneously, or if you have not set any breakpoints. In the latter case, enabling the Run | Break at First Line in PHP Scripts option on the main menu may also help.

If the check box is cleared, no debugging sessions is established and the PHP script is just executed without being suspended.