XDebug升級更新配置

XDebug升級更新配置

不知不覺中,XDebug 已經是Version 3 了!

根據官方文檔 https://xdebug.org/docs/upgrade_guide ,之前XDebug 2 的配置 (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini )如下所示:

xdebug.remote_connect_back=0
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_host="host.docker.internal"
xdebug.remote_port=9001
xdebug.idekey=PHPSTORM
memory_limit = 1024M
xdebug.remote_log="/tmp/xdebug.log"

需要改成這樣(v3):

xdebug.discover_client_host=false
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host="host.docker.internal"
xdebug.client_port=9001
xdebug.idekey=PHPSTORM
memory_limit = 1024M
xdebug.log="/tmp/xdebug.log"
Y Cheung

Y Cheung

Blogger, Programer & Traveler.
Shanghai