PhpStorm 2017.3 Help

Debugging

Overview

This section describes the procedures that are common for various types of applications. and PHP Frameworks and External Tools.

PhpStorm provides a full range of facilities for debugging your source code:

  • Breakpoints in PHP.
  • Breakpoints in HTML and JavaScript.
  • Multiple simultaneous debugging sessions.
  • Customizable breakpoint properties: conditions, pass count, etc.
  • Frames, variables, and watches views in the debugger UI.
  • Runtime evaluation of expressions.
  • Support for Xdebug and Zend Debugger.

General debugging steps

  1. Decide which debugging engine you would like to use: Xdebug or Zend Debugger. On choosing the engine, install and configure it as described in Configuring the debugger engine.
  2. To debug CoffeeScript, TypeScript, and Dart code, you need to generate a source map for it. This will set the correspondence between lines in your original code and in the generated JavaScript code. If no source map is generated, your breakpoints will not be recognized and processed correctly.
  3. Depending on your debugging mode, define a run/debug configuration.
  4. Create breakpoints in the source code.
  5. Launch a debugging session as described in PHP Debugging Session.
  6. Pause or resume the debugging session as required.
  7. During the debugger session, step through the breakpoints, evaluate expressions, change values on-the-fly examine suspended program, and set watches.

After you've started a debug session, the debug icon that marks the Debug tool window toggles to debug active to indicate that the debug process is active.

If you want to see the list of all currently debugging applications, select Run | Show Running List from the main menu. Refer to the Viewing Running Processes section for details.

Last modified: 29 March 2018

See Also