PhpStorm Debugging

Quick start

Install debugger

In order to proceed with any debugging scenarios, you should have a debugger installed in your PHP environment.

Install Xdebug
Recommended debugger

Start debugging!

Start here — that's the most popular debugging scenario.

Zero-configuration PHP Web Application Debugging

Debugging PHP Web Application

Where do you want to debug?

Locally

Debugger and PhpStorm are running on the same machine

Remotely

Debugger is running on a remote environment (e.g. remote server, virtual machine)

Yes
Is there a direct communication between your machine and remote server with debugger?
No

Debugging PHP CLI Script

Where do you want to debug?

Locally

Debugger and PhpStorm are running on the same machine

Remotely

Debugger is running on a remote environment (e.g. remote server, virtual machine)

Debugging Features and Interface

Breakpoints

While debugging, we typically use breakpoints to pause the execution of our application at a specific line of code. PhpStorm provides different types of breakpoints, such as line breakpoints, temporary breakpoints, and more.

Variables Pane

In this pane we can see the variables that are in scope at the current breakpoint, e.g for a breakpoint inside a function body, the variables created within that function will be visible.

Stepping through Code

As soon as breakpoint is hit, you have a control over the program's execution. Each stepping action advances the execution point to the next location, such as step over, step into, step out, run to cursor, step filters, and more.

Debug Tool Window

Once the debugger is launched, PhpStorm shows the debug tool window. It consists of debugger toolbars, frames pane, variables pane, watches pane, and console tab.

More debugging features

Experience any Problems?

Check out a full troubleshooting guide for more information!

Troubleshooting PhpStorm Debugging

Advanced Debugging Scenarios

Debugging PHP Web Applications with Run/Debug Configurations

Simultaneous Debugging Sessions with PhpStorm

Multi-user Debugging in PhpStorm with Xdebug and DBGp Proxy

Related Tutorials

Should you still require assistance with debugging configuration, please report an issue to PhpStorm technical support.