I get this error when using Xdebug version 3 with PhpStorm version 2020.2.4 :
Connection was not established.
Cannot start debugger session with 'Xdebug 3.0.0' Validate installation
php.ini Config:
xdebug.mode=develop
xdebug.start_with_request=yes
xdebug.client_port=9003
Xdebug uses the DBGp debugging protocol and gives debugging and profiling capabilities. It allows us to add breakpoints and stop the code execution at every breakpoint to see variables output in only one code iteration. So Xdebug lets you save your time, which is otherwise lost in code debugging.
As of Xdebug 3, it is possible to disable the Xdebug completely by setting the option xdebug. mode to off , or by setting the environment variable XDEBUG_MODE=off . It is very easy to disable Xdebug just for composer, by aliasing composer . You can add the alias to your $HOME/.
Port 9003 is the default for both Xdebug and the Command Line Debug Client.
Verify that Xdebug is properly running by checking again with phpinfo() or php -v as explained above. Note that 9003 is the default port. If this port is used by another service on your system, change it to an unused port. After adding these settings, restart your webserver again.
Xdebug 3 is fully supported from 2020.3 version only.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With