Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.21 KB

xdebug.md

File metadata and controls

43 lines (30 loc) · 1.21 KB

Xdebug

You can set the default value for the PHP_DEBUGGER in your .env file:

PHP_DEBUGGER=xdebug
XDEBUG_REMOTE_HOST=192.168.178.123

XDEBUG_REMOTE_HOST is the ip-address of your IDE.

Information on how to set up xdebug with PHPStorm is here: Creating a PHP Debug Server

Enable and disable xdebug in running container

# enables xdebug and restarts fpm
xdebug-enable
# disable xdebug and restarts fpm
xdebug-disable

With xdebug enabled you need to activate xdebug on script run.

CLI: run any php script with this prefixed

PHP_IDE_CONFIG="serverName=Unnamed" XDEBUG_CONFIG="remote_enable=1" php #...

WEB: We recommend the usage of an enable-disable Xdebug helper

Listening for PHP Debug Sessions

If you want to use the "Start Listening for PHP Debug Connections" Button in PHPStorm, you can set these ENV variables: Where Unnamed is the name of the server config in PHPStorm.

    - php.xdebug.remote_enable=1
    - php.xdebug.remote_autostart=1
    - PHP_IDE_CONFIG=serverName=Unnamed