2026 Community Survey results are here! See how the Craft CMS community works. results are live!

Welcome to Debugging with Xdebug

Ryan says hello and shares what we'll learn in this course.

This quick-start course will move you from var_dump() and dd() to pro­fes­sion­al debug­ging with Xde­bug. You’ll learn to set up, con­fig­ure, and use Xde­bug in DDEV with Php­Storm and VS Code.

My goal is sim­ple: make Xde­bug your default debug­ging tool. By the end of this course, you’ll be com­fort­able using a prop­er debug­ger instead of lit­ter­ing your code with dump statements.

We’ll focus on Craft CMS projects, but these debug­ging tech­niques apply to any PHP frame­work or CMS.

What we’ll cover:

  • How Xde­bug works and where it fits in your toolchain
  • Set­ting up Xde­bug in Php­Storm and VS Code
  • Con­fig­ur­ing Xde­bug in DDEV, the offi­cial­ly sup­port­ed local­host­ing tool for Craft CMS
  • Set­ting and man­ag­ing breakpoints
  • Step debug­ging (into, over, out)
  • Debug­ging Twig tem­plates in PhpStorm
  • Prac­ti­cal debug­ging exer­cis­es using our cus­tom Bug­gy plugin

Let’s start by under­stand­ing what Xde­bug actu­al­ly is and how it works.

Craft Version
Craft 4, Craft 5
Instructor
Level
Intermediate
Date Published
December 09, 2025