PhpStrom xdebug

PhpStrom xdebug

简介

xdebug

Xdebug是一个开放源代码的PHP程序调试器(即一个Debug工具),可以用来跟踪,调试和分析PHP程序的运行状况。Xdebug现在的最新版本是Xdebug 2.4.0RC4,release日期 2016-01-25,添加了对PHP7的支持。(摘自百度百科)

Zero-configuration Web Application Debugging with Xdebug and PhpStorm

服务器安装(CENTOS7)

xdebug-2.5.1.tgz

wget https://xdebug.org/files/xdebug-2.5.1.tgz -P /usr/local/src/

tar -zxvf xdebug-2.5.1.tgz

cd xdebug-2.5.1

/usr/local/php/bin/phpize

./configure –with-php-config=/usr/local/php/bin/php-config

make && make install

cd /usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/

vim /usr/local/php/etc/php.ini

[XDEBUG]
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so
xdebug.remote_enable = On
xdebug.remote_handler = dbgp
xdebug.remote_host = 192.168.31.206 //对应PHPSTROM 客户端IP
xdebug.remote_port = 9000 //对应PHPSTROM Debug port
xdebug.idekey = PHPSTORM //对应PHPSTROM IDE key

systemctl restart php-fpm

客户端安装

PHPSTROM设置
File -> Settings -> Languages & Frameworks -> PHP -> Debug

XDebug

File -> Settings -> Languages & Frameworks -> PHP -> Debug -> DBGp Proxy

IDE key //对应服务器xdebug.idekey
Host //对应服务器IP
Port //对应服务器端口

Run/Debug Configurations -> add PHP Web Application

Server settings

Name //任意
Host //对应服务器IP
Port //对应服务器端口
Absolute path on the server //对应服务器相应的目录
chrome浏览器设置
https://chrome.google.com/webstore/category/extensions?hl=zh-CN 

JetBrains IDE Support

问题

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

# yum install m4
# yum install autoconf

参考文件

phpstorm+Xdebug断点调试PHP

本地环境phpStorm10+XDebug配置和断点调试

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值