无法使用 PhpStorm 设置 Xdebug。只有index.php可以捕获断点

Gro*_*ing 4 debugging xdebug phpstorm

我正在尝试使用 phpstorm 设置 xdebug 调试器。我在 Windows 7 上运行 xampp。php.ini 中的 Xdebug 部分:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.5-5.5-vc11.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.idekey = "PHPSTORM"
xdebug.remote_port = 10000
xdebug.trace_output_dir = "C:\xampp\tmp"
Run Code Online (Sandbox Code Playgroud)

在 phpstorm 中我检查了这一点:

IDE 找到 php 和 xdebug

另外,我设置了适当的端口:

在此输入图像描述

之后我:

  1. 创建书签以使用适当的 IDE 密钥 (PHPSTORM) 启动调试器(在 jetbrain 页面上生成);

  2. 使用了 Google Chrome 的特殊扩展,它还为此设置了 cookie:

在此输入图像描述

最后,我什至禁用了防火墙(在此之前我尝试添加规则,但这没有帮助)。

我在这里写的内容并没有帮助我捕获断点。我点击了 IDE 中的“电话按钮”,这也没有帮助。而且,我想强调的是,来自 Xdebug 的传入请求也不是在第一次使用时出现的。

另外,我想提一下,只有 index.php 调试有效。任何控制器/操作都不会,但只有index.php 可以。

在 phpinfo() 中,xdebug 也存在:

在此输入图像描述

pca*_*bra 5

请参阅:在 PHPStorm 中将一个目录路径映射到另一个目录路径

在“设置”->“PHP”->“服务器”中,映射调试文件所需的所有文件夹。