Skip to content

Xdebug ​

Xdebug is a PHP debugger and profiler. It is included in DDEV, so you do not need to install it.

Turn Xdebug on or off ​

Click the Xdebug button at the top right of the project page. It shows On or Off. The button is not available when the project is stopped.

The app runs ddev xdebug toggle. Each project has its own Xdebug setting.

You can also enable Xdebug when you create a project. Select Enable Xdebug in the new project dialog.

WARNING

Xdebug makes PHP much slower. Turn it off when you stop debugging.

Configure your IDE ​

For VS Code, the app can add the configuration:

  1. Click the ⋮ button next to the Xdebug button.
  2. Click VSCODE.
  3. Confirm.

The app writes .vscode/launch.json with a Listen for Xdebug configuration (port 9003), and .vscode/tasks.json with tasks that turn Xdebug on when debugging starts and off when it stops.

For other IDEs, see the DDEV IDE setup guide.

If your IDE runs in an unusual location, set Xdebug IDE Location in the global DDEV configuration. See Configuration.

Troubleshooting ​

See the DDEV Xdebug troubleshooting guide.

DevWorkspace Pro - One workspace for every project