15

我已经安装xdebug了,PHP但现在我无法使notepad++ DBGp插件工作。

我有最新wamp版本,Win7文件wwww夹在分区上:d:\www.

我编写了一个测试文件test.php

<?php
    $test = "3";
    echo $test;
?>

我尝试使用此链接在网络浏览器中打开它:

http://localhost/test.php?XDEBUG_SESSION_START=test

DBGp不会连接。我试过有和没有IDE_Key.

我已经多次阅读文档,但无法找到/解决问题。希望有人能知道原因。

下面是一些截图:

在此处输入图像描述

在此处输入图像描述

4

3 回答 3

1

要解决此问题,需要更改 xdebug 设置和 dbgp 设置上的端口。

从上述评论中不清楚是否是因为他们都试图使用相同的端口,端口被其他应用程序使用等,但也许 Kandinski 可以通过在他们看到这个答案时编辑这个答案来澄清这一点。

(发布给定的答案 [见问题评论] 以从未回答的队列中删除问题。用户在 3 年前被要求这样做,但尚未这样做。这个答案的功劳仍然是他们的)

于 2013-02-13T15:18:47.130 回答
0

您必须将 xdebug 设置为自动接受新的调试连接:

 $ cat /etc/php5/apache2/conf.d/xdebug.ini
  zend_extension=/usr/lib/php5/20121212/xdebug.so
  xdebug.remote_enable=1
  xdebug.remote_autostart=1
  xdebug.remote_host="127.0.0.1"
  xdebug.remote_port=9000
  xdebug.idekey="CLUJ3$"

显然,如果您将 PHP 作为 FPM 运行,则必须将默认端口更改为 9000 到其他端口(例如:9001)

之后重启apache。

于 2014-11-07T23:41:58.030 回答
0

安装 Chrome XDebug Helper。在选项中,设置 IDE Key = Others 和 value = default。为我工作。

    [Xdebug]
    zend_extension="php_xdebug.dll"
    xdebug.remote_enable=1
    xdebug.remote_port=9000
    xdebug.autostart=on 
    xdebug.remote_handler=dbgp
    xdebug.remote_mode=req
    xdebug.idekey=default
于 2019-11-28T19:48:46.027 回答