在便携式驱动器上配置 xdebug [英] Configure xdebug on portable drive

查看:32
本文介绍了在便携式驱动器上配置 xdebug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试设置 xdebug.我确实使用 XAMPP 便携式 PHP v 7.4.11.我下载了 dll php_xdebug-3.0.2-7.4-vc15-x86_64.dllphp_xdebug-3.0.2-7.4-vc15-nts-x86_64.dll 并将它们放入<代码>\xampp\php\ext.然后我设置 php.ini 文件:

I am trying to set xdebug. I do use XAMPP portable, PHP v 7.4.11. I downloaded dlls php_xdebug-3.0.2-7.4-vc15-x86_64.dll and php_xdebug-3.0.2-7.4-vc15-nts-x86_64.dll and put them in \xampp\php\ext. Then I set php.ini file:

implicit_flush = On

zend_extension_ts = H:\xampp\php\ext\php_xdebug-3.0.2-7.4-vc15-x86_64.dll
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.profiler_enable = 0 
xdebug.profiler_output_dir = \tmp 
xdebug.dump_globals=On 
xdebug.show_exception_trace=On 
xdebug.collect_params=4 

我重新启动了服务器,但在 http://localhost/dashboard/phpinfo.php 或 php shell 中的模块中我看不到任何有关 xdebug 的信息.我已经尝试了下载的 dll、各种端口、相对/绝对路径.什么都行不通.网上有一些教程,但它们可能已经过时,或者便携式设置有问题?有什么想法吗?

I restarted server, but I can not see any info about xdebug at http://localhost/dashboard/phpinfo.php or among modules in php shell. I have tried both downloaded dlls, various ports, relative/absolute path. Nothing works. There are a few tutorials online, but they might be out of date, or is there problem with portable setting? Any idea, please?

推荐答案

我更改了 dll 的路径和设置:

I changed dll`s path and settings:

zend_extension=php_xdebug-3.0.2-7.4-vc15-x86_64.dll

[XDebug]
xdebug.mode=debug
xdebug.client_host = localhost
xdebug.client_port = 9003
xdebug.remote_handler="dbgp"
xdebug.output_dir = H:\xampp\tmp 

现在在 php 控制台中的 php -v 之后我得到:

Now after php -v in php console I get:

PHP 7.4.11 (cli) (built: Sep 29 2020 13:18:06) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.0.2, Copyright (c) 2002-2021, by Derick Rethans

那很好.在 http://localhost/dashboard/phpinfo.php:

根据 https://wiki.php.net/internals/extensions,由于php 5.5 不需要填写dll的整个路径,只要它的名字

According to https://wiki.php.net/internals/extensions, since php 5.5 there is no needed to fill whole path to dll, only it`s name

这篇关于在便携式驱动器上配置 xdebug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆