3 回答

TA貢獻1806條經驗 獲得超8個贊
我對碼頭工人了解不多。這是我在 Ubuntu 18.04(在 HyperV VM 中)上為 PhpStorm 安裝 XDebug 的筆記。可能有一些錯誤,但這對我有用。
apt install php-xdebug
##### Ubuntu Server #####
mkdir -p /var/log/xdebug
touch /var/log/xdebug/xdebug.log
chown -R www-data:www-data /var/log/xdebug
nano /etc/php/7.2/mods-available/xdebug.ini
################################################################################################################################################################################################################
# The default value for zend_extension is enough. But if you want to change, go to /usr/lib/php/ and find latest folder with xdebug.so (in my case '20180731') and make full path to provide in zend_extension #
################################################################################################################################################################################################################
xdebug.default_enable = 1
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_connect_back = 1
xdebug.idekey = PHPSTORM
xdebug.remote_log = /var/log/xdebug/xdebug.log
;zend_extension=/usr/lib/php/20180731/xdebug.so
;xdebug.remote_host = 127.0.0.1
;xdebug.remote_autostart = 1
;xdebug.remote_handler = dbgp
;xdebug.remote_mode = req
systemctl restart apache2
- 3 回答
- 0 關注
- 291 瀏覽
添加回答
舉報