At a Glance
Language
PHP
Topic
DevOps Drupal
Tags
Drupal Ops
Summary

Xdebug is a PHP extension that can massively improve your debugging experience and speed – for both backend and frontend developers. Conversely, it can also drag down your php speed to a crawl, so you want to configure it to be a simple toggled – and only enable when you are using it. Xdebug works with most IDEs but I will be specifically showcasing usage with PHPStorm as that is what I use it with.

Prerequisites
  • Development server - for performance reasons Xdebug should never be enabled in production (Lando, WSL, docker, local PHP install any should work)
  • Drupal 9 or 10
  • Moderate comfort with PHP
  • Depending on development server, moderate command line comfort.

# Introduction

Xdebug is a PHP extension that can massively improve your debugging experience and speed – for both backend and frontend developers. Conversely, it can also drag down your php speed to a crawl, so you want to configure it to be a simple toggled – and only enable when you are using it. Xdebug works with most IDEs but I will be specifically showcasing usage with PHPStorm

# Recorded Section from DrupalCon Portland 2022

# Details

For those that prefer/easier to copy code, here's the textual representation. Firstly, the slides

Also have a github repo with some example code and documentation for various situations for easy copy/paste.