运行环境:
PHPSTORM版本 : 2016.3
PHP版本 : 5.6.2
xdebug版本:php_xdebug-2.2.5-5.6-vc11-x86_64.dll
ps : php版本和xdebug版本一定要相对应
xdebug下载地址:http://xdebug.org/download.php
1.首先在wamp环境下的php.ini
中添加关于xdebug
的配置信息
[XDebug]
zend_extension="D:\phpStudy\php\php-5.6.27-nts\ext\php_xdebug.dll"
xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
2.重启查看phpinfo()
会显示有关xdebug
的信息
3.开始配置phpStorm
1.客户端调试,打开phpStorm,进入File>Settings>PHP>Servers,这里要填写服务器端的相关信息,name填localhost,host填localhost,port填80,debugger选[XDebug]
2.进入File>Settings>PHP>Debug,看到XDebug选项卡,port填9000,其他默认
3.进入File>Settings>PHP>Debug>DBGp Proxy,IDE key 填 phpStorm,host 填localhost,port 填80
此时phpstorm上面的调试运行按钮是灰色的
点击phpStorm上面的
先配置server
点击应用,确定
打上断点,此时调试运行按钮已经变绿 点击调试按钮即可开始进行调试
网友评论