PhpStorm 2017.3 Help

Debugging with PhpStorm: Ultimate Guide

This section provides a handful selection of tutorials that will help you get started with debugging in PhpStorm.

Quick Start

Before proceeding with any of the debugging scenarios, you need to choose a debugging engine and install it in your PHP environment. These tutorials will guide you through the installation process:

With the debugging engine installed, you can start debugging your application by following the zero-configuration debugging approach:

  1. Choose and install the browser extension suitable for your browser.
  2. On the PhpStorm toolbar, toggle the start_listening_php_debug_connections button to start listening for incoming PHP debug connections, or choose Run | Start Listening for PHP Debug Connections on the main menu.
  3. Start the debugging session in the browser using the installed browser extension.

Debugging a PHP Web Application

Depending on your environment, you can debug your PHP Web application locally or remotely.

Local debuggingRemote debugging
The debugging engine and PhpStorm are running on the same machine. The debugging engine is running on a remote environment (e.g. a remote server or a virtual machine).
Follow the Zero-configuration PHP Web application tutorial.

Debugging a PHP CLI Script

Depending on your environment, you can debug your PHP CLI script locally or remotely.

Local debuggingRemote debugging
The debugging engine and PhpStorm are running on the same machine. The debugging engine is running on a remote environment (e.g. a remote server or a virtual machine).
Follow the Debugging PHP CLI scripts with PhpStorm tutorial.
  1. Set up a remote PHP interpreter as described in the Working with Remote PHP Interpreters in PhpStorm tutorial.
  2. Follow the Debugging PHP CLI scripts with PhpStorm tutorial.

Besides running an entire application, you may want to run a PHPUnit or Behat test that covers a specific class, function or scenario, with the debugging engine attached. To learn how to do it, follow the Debugging and Profiling PHPUnit and Behat Tests with PhpStorm tutorial.

Troubleshooting

When using Xdebug or Zend Debugger with PhpStorm, some misconfiguration can prevent the debugger from working. In the Troubleshooting guide, you will find the description of some common issues and learn how to troubleshoot them.

Advanced Debugging Scenarios

The following tutorials will assist you in exploring the advanced debugging scenarios in PhpStorm:
Last modified: 29 March 2018

See Also