我已經(jīng)在 Mac 上使用 XAMPP 設(shè)置了 PHP 項(xiàng)目,并在那里安裝了 Xdebug,但在我的 PhpStorm 上我得到:
我在網(wǎng)上找不到任何東西。
我的 php.ini
[xdebug] ;zend_extension=xdebug.so zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so xdebug.remote_enable=1 xdebug.remote_connect_back=0 xdebug.remote_handler=dbgp xdebug.remote_host=localhost xdebug.remote_port=9002 xdebug.remote_log="/mnt/log/xdebug.log" xdebug.remote_autostart=1 xdebug.idekey=phpstorm xdebug.remote_mode = req
我可能會(huì)遲到,但請(qǐng)確保 XDebug 具有對(duì)該文件夾的寫入權(quán)限,更不用說如果您使用的是 Docker。
如果是本地的,那么只是出于調(diào)查目的嘗試:
chmod 777 /mnt/log/xdebug.log
但是,我寧愿選擇指定一個(gè)文件夾來記錄文件。
如果它在 Docker 中運(yùn)行,則“chmod”實(shí)際安裝的文件夾。