PhpStrom xdebug

来源:互联网 发布:wince小软件下载 编辑:程序博客网 时间:2024/06/05 12:05

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.soxdebug.remote_enable = Onxdebug.remote_handler = dbgpxdebug.remote_host = 192.168.31.206 //对应PHPSTROM 客户端IPxdebug.remote_port = 9000 //对应PHPSTROM Debug portxdebug.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.idekeyHost //对应服务器IPPort //对应服务器端口Run/Debug Configurations -> add PHP Web ApplicationServer settings

Name //任意Host //对应服务器IPPort //对应服务器端口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配置和断点调试

0 0
原创粉丝点击