>  기사  >  백엔드 개발  >  Mac에 PHP Xdebug 설치

Mac에 PHP Xdebug 설치

不言
不言원래의
2018-05-05 15:12:212267검색

이 글에서는 Mac에서 PHP 디버깅 도구 Xdebug를 설치하는 자세한 단계를 소개합니다. 필요한 경우 이를 참조할 수 있습니다.Mac에서 PHP 디버깅 도구 Xdebug 설치

설치 단계

    brew install php70
  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 설치
    我的调试地址:http://localhost:8080/email/send.php?XDEBUG_SESSION_START=15550

  6. 愉快的调试吧,哈哈


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 설치
    我的调试地址:http://localhost:8080/email/send.php?XDEBUG_SESSION_START=15550

    brew install php70-xdebug
  6. php -i | grep xdebug.inixdebug를 찾으세요. ini의 구성 파일은 /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini


vim /usr/local/etc/php/7.0/conf.d/ ext입니다. -xdebug.ini

rrreee🎜🎜🎜PHPStorm🎜🎜에서 구성됨Mac에 PHP Xdebug 설치🎜🎜🎜Mac에 PHP Xdebug 설치🎜🎜🎜Mac에 PHP Xdebug 설치🎜🎜🎜Mac에 PHP Xdebug 설치 🎜🎜🎜Mac에 PHP Xdebug 설치🎜🎜I 디버깅 주소: http://localhost:8080/email/send.php?XDEBUG_SESSION_START=15550🎜🎜🎜🎜즐거운 디버깅 되세요. 하하🎜🎜🎜

🎜🎜🎜 PHP 디버깅 도구 설치>php -i | grep xdebug.ini xdebug.ini 구성 파일을 찾으세요. 내 파일은 /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini입니다. 🎜🎜🎜🎜vim /usr/local/etc/php/7.0/conf.d/ext-xdebug.ini🎜rrreee🎜🎜🎜PHStorm에서 구성🎜🎜Mac에 PHP Xdebug 설치🎜🎜🎜Mac에 PHP Xdebug 설치🎜🎜🎜Mac에 PHP Xdebug 설치🎜🎜🎜Mac에 PHP Xdebug 설치🎜🎜🎜Mac에 PHP Xdebug 설치🎜🎜내 디버깅 주소: http://localhost:8080/email/send.php?XDEBUG_SESSION_START=15550🎜 🎜🎜🎜행복해 디버깅해보자, 하하🎜🎜🎜🎜🎜🎜

위 내용은 Mac에 PHP Xdebug 설치의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.