debug
现在phpstudy中开启php扩展xdebug 然后修改php.ini配置文件 看看路径是否正确

我当时是使用的phpstudy环境自带的.dll文件 放在php5.6版本上没有任何问题 可以正常使用 可是我是用的7.0版本时使用 xdebug就是不管用 ,后来自己下载了2.6版本的 下载地址 之前是2.4版本的。

在php.info全选后 粘贴到这里 点击下方的生成按钮,

生成以后你会看到点击下载 ,下载好了之后放在你的安装的相应的版本环境中就可以了 我的是放在D:\phpStudy\PHPTutorial\php\php-7.0.12-nts\ext

最后就是修改php.ini配置文件了
[XDebug]
xdebug.profiler_output_dir="D:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.trace_output_dir="D:\phpStudy\PHPTutorial\tmp\xdebug"
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 = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
尤其是这里的路径是否正确,

修改好了以后 重启phpstudy 然后检查一下 在cmd命令中输入 php -m查看是否有Xdeug。有以下这些之后就可以使用了。

在php7的版本上也可用了。 嘿嘿

这是php5.6版本的 一般在使用tp3的时候才用到 虽然不怎么常用 还是留下来做个记录吧
[XDebug]
xdebug.profiler_output_dir="D:\phpStudy\PHPTutorial\tmp\xdebug"
xdebug.trace_output_dir="D:\phpStudy\PHPTutorial\tmp\xdebug"
zend_extension="D:\phpStudy\PHPTutorial\php\php-5.6.27-nts\ext\php_xdebug.dll"
xdebug.remote_enable =1
xdebug.auto_trace = On ;开启自动跟踪
xdebug.remote_handler = dbgp
xdebug.remote_autostart = Off ;开启远程调试自动启动
xdebug.remote_enable = On ;开启远程调试
xdebug.remote_host = localhost
xdebug.collect_vars = On ;收集变量
xdebug.collect_return = On ;收集返回值
xdebug.collect_params = On ;收集参数
xdebug.remote_mode = req
xdebug.remote_port = 9000
xdebug.idekey=PHPSTORM
本文介绍了如何在PHPStudy环境中配置和使用Xdebug扩展。针对PHP 7.0版本遇到的问题,通过下载2.6版本的Xdebug解决,并详细说明了dll文件的放置路径、php.ini配置文件的修改以及验证Xdebug是否成功启用的方法。

2372

被折叠的 条评论
为什么被折叠?



