Stratosv1.4.0

PHP

Xdebug

Enable step-debugging per project without polluting global PHP config.

Why it's per-project

Stratos does not enable Xdebug globally. Toggling it on a single project adds the zend_extension line to that project's FPM pool config and reloads PHP. Other sites are unaffected.

Enabling Xdebug

  1. Open the Sites tab.
  2. Click the Xdebug toggle for the project you want to debug.
  3. Wait one second for the FPM pool to reload.

Or in stratos.yml:

xdebug: true

Configuring your IDE

PhpStorm

  1. Settings → PHP → Debug → Xdebug → port 9003.
  2. Run → Start Listening for PHP Debug Connections.
  3. Install the Xdebug helper browser extension or pass ?XDEBUG_SESSION=1 in the URL.

VS Code

  1. Install the PHP Debug extension.
  2. Add a launch config:
    {
      "name": "Listen for Xdebug",
      "type": "php",
      "request": "launch",
      "port": 9003,
      "pathMappings": {
        "/Users/me/Sites/myapp": "${workspaceFolder}"
      }
    }
  3. Start the listener and reload the page.

Disabling globally (just in case)

If you ever want to disable Xdebug across every site — for example, before a benchmark — uncheck it on every site. There is no global toggle by design.