Xdebug

Step-by-step instructions to configure Xdebug debugging inside VS Code and PhpStorm.

Debugging with Xdebug

Xdebug is a powerful tool for profiling and debugging PHP applications. Burrow comes with Xdebug pre-installed for all supported PHP versions.

Enabling Xdebug

Enable Xdebug in the PHP Versions tab under the extensions panel of your active PHP runtime. Burrow configures Xdebug to listen on port 9003 and restarts the PHP service automatically.

IDE Configuration

VS Code

  1. Install the PHP Debug extension from the marketplace.
  2. Create a .vscode/launch.json file in your project:
    {
      "version": "0.2.0",
      "configurations": [
        {
          "name": "Listen for Xdebug",
          "type": "php",
          "request": "launch",
          "port": 9003
        }
      ]
    }
    
  3. Press F5 to start listening, set a breakpoint, and refresh your page.

PhpStorm

  1. Go to SettingsPHPServers and add a server pointing to your local domain (e.g. myapp.local).
  2. Go to SettingsPHPDebug and confirm the Xdebug port is set to 9003.
  3. Click the Start Listening for PHP Debug Connections icon in the toolbar, set a breakpoint, and refresh your page.