您的位置:首页 > 编程语言 > PHP开发

mac下phpstorm配置xdebug

2016-08-31 13:35 281 查看
1.下载地址 http://www.xdebug.org/download.php,下载源码版的 

tar -zxvf xdebug-2.4.0rc3.tgz
cd xdebug-2.4.0RC3/
使用whereis phpize查看phpize的路径
whereis phpize
执行使用详细路径的phpize
make
make install

安装好后提示安装目录:

Installing shared extensions:     /usr/local/Cellar/php55/5.5.38/lib/php/extensions/no-debug-zts-20121212/

之后在php.ini中加入:

[Xdebug]
zend_extension=xdebug.so
xdebug.remote_enable = on
;xdebug.remote_handler=dbgp
xdebug.remote_host="127.0.0.1"
xdebug.remote_port=9111
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.remote_autostart = on

重启apache,
sudo apachectl restart

打开phpstorm,file->Default Preferences->Languages & Frameworks
php language level: 我这里是5.5
default interpreters :新建一个,php路径写你的php地址





DBGP Proxy设置:



接下来配置server,我这个版本里面没有server。在run->debug Configurations 里设置



添加server



接下来就可以调试了。。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息