首頁  >  文章  >  後端開發  >  Mac下方安裝PHP Xdebug

Mac下方安裝PHP Xdebug

不言
不言原創
2018-05-05 15:12:212267瀏覽

本篇文章給大家詳細的介紹了關於Mac下安裝PHP調試工具Xdebug的詳細步驟,若是有需要的小伙伴可以參考一下

Mac下安裝PHP偵錯工具Xdebug

安裝步驟

  1. #brew install php70

  2. #brew install php70-xdebug

  3. php -i | grep xdebug.ini找到xdebug.ini的設定檔我的是/usr/local /etc/php/7.0/conf.d/ext-xdebug.ini

  4. #vim  /usr/local/etc/php/7.0/conf.d/ext-xdebug .ini

    配置如下:
    [xdebug]
    zend_extension="/usr/local/opt/php70-xdebug/xdebug.so"
    xdebug.remote_enable = On
    xdebug.remote_handler = dbgp
    xdebug.remote_host= localhost
    xdebug.remote_port = 9001   #这个端口不要被占用即可,可以自行指定
    xdebug.idekey = PHPSTORM
    xdebug.remote_autostart=1
    xdebug.remote_log=/var/tmp/xdebug.log
  5. 在PHPStorm中設定

    Mac下方安裝PHP Xdebug

    Mac下方安裝PHP Xdebug

    Mac下方安裝PHP Xdebug

    Mac下方安裝PHP Xdebug

    Mac下方安裝PHP Xdebug


  1. 我的偵錯位址:http://localhost:8080/email/send.php?XDEBUG_SESSION_START=15550

  2. #愉快的調試吧,哈哈

  3. Mac下方安裝PHP偵錯工具Xdebug

    #安裝步驟Mac下方安裝PHP Xdebug

    brew install php70 Mac下方安裝PHP Xdebug

    Mac下方安裝PHP Xdebugbrew install php70-xdebug

    Mac下方安裝PHP Xdebugphp -i | grep xdebug.ini

    找到xdebug.ini的設定檔我的是/usr/local/etc/php/7.0/conf.d/ext-xdebug.ini

    Mac下方安裝PHP Xdebug
    vm  /usr /local/etc/php/7.0/conf.d/ext-xdebug.ini#

    配置如下:
    [xdebug]
    zend_extension="/usr/local/opt/php70-xdebug/xdebug.so"
    xdebug.remote_enable = On
    xdebug.remote_handler = dbgp
    xdebug.remote_host= localhost
    xdebug.remote_port = 9001   #这个端口不要被占用即可,可以自行指定
    xdebug.idekey = PHPSTORM
    xdebug.remote_autostart=1
    xdebug.remote_log=/var/tmp/xdebug.log
  4. 在PHPStorm設定


################################################### ################我的偵錯位址:###http://localhost:8080/email/send.php?XDEBUG_SESSION_START=15550########## ######愉快的調試吧,哈哈##################

以上是Mac下方安裝PHP Xdebug的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn