I would like to try Xdebug 3.0.0RC1 to explore what has changed and the new features that come with it. I am also using the latest PhpStorm 2020.3 EAP which supports Xdebug 3 wi
PHP 7.4
Docker
PHPStorm 2020.1
Xdebug 3.1.0
Install Xdebug in your docker container using Dockerfile
RUN pecl install xdebug-3.0.1 && docker-php-ext-enable xdebug
Configure php.ini with following:
[xdebug]
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.discover_client_host = 1
Go to PHPStorm - Settings - PHP - Debug - Xdebug and set the port to 9003 (by default)
PHPStorm
That's it (:
If you want to enable/disable debugger only when you need it: just install a browser extension called "Xdebug helper", select "Debug" and remove "xdebug.start_with_request = yes" from php.ini
[xdebug]
xdebug.mode = debug
xdebug.discover_client_host = 1