phpstorm开启断点调试【mac环境】

Mac环境安装MAMP自带集成xDebug插件

1.首先查看php.ini位置


phpstorm开启断点调试【mac环境】_第1张图片

打开配置文件,在配置文件搜寻xdebug在底部去除前面;注释

zend_extension的路径根据自己环境修改

然后保存重启MAMP

[xdebug]

zend_extension="/Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20131226/xdebug.so"

xdebug.remote_enable=on

xdebug.idekey="PHPSTORM"

xdebug.remote_handler="dbgp"

xdebug.remote_mode="req"

xdebug.max_nesting_level=600

phpstorm开启断点调试【mac环境】_第2张图片

然后打开phpstorm在属性设置-》php-》选择对应版本


phpstorm开启断点调试【mac环境】_第3张图片


phpstorm开启断点调试【mac环境】_第4张图片

配置监听服务 

打开phpstorm右上角的三角形,点开编辑配置


phpstorm开启断点调试【mac环境】_第5张图片

点击server旁边的按钮,添加调试域名

phpstorm开启断点调试【mac环境】_第6张图片

在新的窗口配置调试域名




phpstorm开启断点调试【mac环境】_第7张图片

配置完成后右上角的菜单

现在就可以打断点,然后点击小爬虫就可以了

phpstorm开启断点调试【mac环境】_第8张图片

你可能感兴趣的:(phpstorm开启断点调试【mac环境】)