phpstorm+thinkphp+xdebug调试成功记录

第一次:xdebug调试成功记录

一、环境

1、按xdebug.org官网的提示需要PHP7.0以上

2、win10

3、PHPSTUDY 

二、设置
1、https://xdebug.org/download.php中点击 custom installation instructions,然后将phpinfo();函数获取的信息粘贴到文本框,系统自动分析对应的xdebug版本并下载

2、将xdebug放到对应的PHP版本的ext文件夹下


3、对应PHP版本的php.ini最底部配置
zend_extension = D:\phpStudy\PHPTutorial\php\php-7.0.12-nts\ext\php_xdebug-2.6.1-7.0-vc14-nts.dll
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_idekey="PHPSTORM"


4、PHPSTORM中配置好后,在浏览器刷新页面则进入调试页面。

参考文档 https://coding.imooc.com/lesson/97.html#mid=3320

 

 

第二次php7.0.12  配置phpstorm+thinkphp+xdebug    2019.11.4

1、切换到php7.0.12,将phpinfo的信息全部复制到https://xdebug.org/wizard

得出以下信息,并按以下信息操作:

Instructions

  1. Download php_xdebug-2.8.0-7.1-vc14-nts.dll
  2. Move the downloaded file to D:\phpStudy\PHPTutorial\php\php-7.1.13-nts\ext
  3. Edit D:\phpStudy\PHPTutorial\php\php-7.1.13-nts\php.ini C:\Windows\php.ini and add the line
    zend_extension = D:\phpStudy\PHPTutorial\php\php-7.1.13-nts\ext\php_xdebug-2.8.0-7.1-vc14-nts.dll
  4. Restart the webserver

2、当phpinfo中有xdebug的版本信息表示安装成功

 

 

;xdebug.remote_idekey="PHPSTORM"   这个设置无效
xdebug.idekey="PHPSTORM";  这个设置phpstorm才有效

按照这个设置测试成功:https://www.cnblogs.com/jingmin/p/6371873.html

 

File->setting配置

 

 

configurations配置(phpstorm右上角)

做好以上配置之后,点击右上角的虫子,会在浏览器打开配置好的打开的网页,假如打开的是注册页,则输入注册信息会自动又切加到PHPstorm,然后进行断点调试。

通过注释掉php.ini的相关配置再重启服务器才能停止xdebug服务(目前的方法)

 

其它参考文档:

https://blog.csdn.net/yinhangbbbbb/article/details/79247331

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值