Setting Up Xdebug with DDEV and PhpStorm

For this video, we are going to learn how to set up Xdebug with PhpStorm running a local server on DDEV. Xdebug runs on the server, as a PHP extension, so the first thing we need to do is enable Xdebug in our Docker container that is managed by DDEV.

For this video, we are going to learn how to set up Xde­bug with Php­Storm run­ning a local serv­er on DDEV. Xde­bug runs on the serv­er, as a PHP exten­sion, so the first thing we need to do is enable Xde­bug in our Dock­er con­tain­er that is man­aged by DDEV.

For­tu­nate­ly, DDEV already has sup­port for this and a com­mand we can to tog­gle Xde­bug on and off. This is how we can set whether we are in debug mode or not.

$ ddev xdebug enable

This enables Xde­bug so it is run­ning as a PHP exten­sion. Now it will be avail­able to call back to our IDE on port 9003 when it receives a HTTP request.

Topic
Instructor
Ryan Irelan
Level
Intermediate
Date Published
July 12, 2021
Ryan Irelan

I am the creator of CraftQuest, a web developer, and former software team manager. I spend most of my time improving CraftQuest with code and courses. When I'm not in front of the computer, I spend my time with my family, and running on the roads and trails of Austin, TX.