Debugging
Step-debugging with XDebug
Install the XDebug PHP extension on your host (php -v should mention with Xdebug), then restart the webserver with it on or off:
- Make
- Ahoy
- No wrapper
make debug # Restart with XDebug enabled
make start # Restart without XDebug
ahoy debug # Restart with XDebug enabled
ahoy start # Restart without XDebug
XDEBUG=1 vendor/bin/eddy-start # Restart with XDebug enabled
vendor/bin/eddy-start # Restart without XDebug
debug is also available as debug-on, xdebug and xdebug-on, and start as debug-off and xdebug-off. debug checks the command line of the running server and skips the restart when XDebug is already on. With XDebug on, every request starts a debug session, because the server runs with xdebug.mode=debug and xdebug.start_with_request=yes.
When the extension isn't installed, start with XDEBUG=1 stops with a message rather than starting a server without it.
Code coverage stays on pcov, because the XDebug settings apply only to the webserver, not to the test commands.
To start and stop debug sessions from the browser, install the Xdebug Helper extension for Chrome or Firefox.
Command output
The commands print only their own progress, such as [TASK] and [ OK ] lines, and hide the output of the tools they run, such as Composer, npm and Drush. When a tool fails, its captured output appears, so the failure is still there to read. The output of your project's own commands, npm run build and the lifecycle scripts, always shows.
Set DEBUG=1 to stream the full output of every tool as it runs:
- Make
- Ahoy
- No wrapper
DEBUG=1 make build
DEBUG=1 ahoy build
export DEBUG=1
vendor/bin/eddy-assemble
vendor/bin/eddy-start
vendor/bin/eddy-provision
Logs
The processes that keep running after a command returns write their output to the project's .logs directory:
| File | Written by |
|---|---|
.logs/php.log | The PHP webserver. |
.logs/chromedriver.log | The chromedriver that FunctionalJavascript tests drive. |
.logs/cloudflared.log | The public tunnel. |
Functional and FunctionalJavascript tests write their HTML pages and screenshots to .logs/browser_output (see Testing). reset removes the whole .logs directory.