Xdebug
Xdebug 3.5.3, toggled per site, on PHP 8.1 through 8.5.
rex site xdebug myshop.rex onOr the toggle on the site’s page in the app.
How it works
Section titled “How it works”Turning it on starts a separate debug pool for that PHP version and re-points the site at it. Sites without the toggle keep using the normal pool and pay nothing — Xdebug’s overhead is real, and applying it to every site so that one site can be debugged would be a bad trade.
Turning it off moves the site back.
Pointing your IDE at it
Section titled “Pointing your IDE at it”Xdebug connects outward to your editor, so your IDE is the listener and rexenv binds nothing.
-
Set your IDE to listen on port 9003 — the DBGp default. PhpStorm calls this “Start Listening for PHP Debug Connections”; VS Code needs a
launch.jsonwith"type": "php","request": "launch","port": 9003. -
Map the server path to your local path if your IDE asks. For a rexenv site the docroot is the same folder your editor has open, so the mapping is usually one-to-one.
-
Set a breakpoint and load the page.
No port configuration is needed inside rexenv, because there is nothing to configure: the version pinned per PHP minor is already wired to the standard port.
Not available on 7.4 or 8.0
Section titled “Not available on 7.4 or 8.0”If you need step debugging on a legacy codebase, the practical answer is to run it on 8.1 locally while it targets 7.4 in production, or to use logging.
Versions are pinned per minor
Section titled “Versions are pinned per minor”Xdebug’s own support windows close. A PHP minor that has fallen outside the window is frozen
at the last Xdebug release that worked with it, rather than being dragged onto a version that
does not support it. rex php list shows what each installed version has.