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
- Open the Sites tab.
- Click the Xdebug toggle for the project you want to debug.
- Wait one second for the FPM pool to reload.
Or in stratos.yml:
xdebug: true
Configuring your IDE
PhpStorm
- Settings → PHP → Debug → Xdebug → port
9003. - Run → Start Listening for PHP Debug Connections.
- Install the Xdebug helper browser extension or pass
?XDEBUG_SESSION=1in the URL.
VS Code
- Install the PHP Debug extension.
- Add a launch config:
{ "name": "Listen for Xdebug", "type": "php", "request": "launch", "port": 9003, "pathMappings": { "/Users/me/Sites/myapp": "${workspaceFolder}" } } - 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.