Xampp便携式USB记忆棒 - 配置xdebug

时间:2016-10-16 09:38:45

标签: php apache xampp

我通过从https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.8.3/下载zip版本,在USB记忆棒上安装了xampp便携式服务器 (出于问题的上下文我想告诉你,首先我尝试通过安装程序安装它,但只在安装的PC上工作,所以如果你安装它,我建议你这样做从zip文件中提取它,因此它可以在你插入闪存驱动器的每台PC上运行。)

所以我使用NetBeans 8,当我使用本地安装的WAMP服务器时,我成功地用它来调试PHP。

我试图调试便携式XAMPP服务器上的PHP代码,但是我失败了。

php.ini xdebug配置如下所示:

[XDebug]
zend_extension = "\xampp\php\ext\php_xdebug.dll"
xdebug.idekey = netbeans-xdebug
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "\xampp\tmp\xdebug"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_autostart = 0
xdebug.remote_connect_back = 0
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_log = "\xampp\tmp\xdebug\xdebug_remot.log"
xdebug.show_local_vars = 9
xdebug.trace_output_dir = "\xampp\tmp\xdebug"

如果有人这样做并且这样告诉我该怎么做,那就太好了。

由于

1 个答案:

答案 0 :(得分:1)

我将分享究竟是什么问题。

首先,我检查phpinfo()的结果,并且我发现 xdebug 模块根本没有加载,但扩展的路径看起来非常正确。

然后我将zend_extension = "\xampp\php\ext\php_xdebug.dll"更改为zend_extension=php_xdebug.dll然后我能够使用NetBeans调试托管在此XAMPP便携式服务器上的PHP应用程序。

干杯!