Warm tip: This article is reproduced from serverfault.com, please click

php-如何在Windows 10上将Xdebug 3连接到PhpStorm?

(php - How can I connect Xdebug 3 to PhpStorm on Windows 10?)

发布于 2020-12-01 14:34:51

我正在尝试用Xdebug连接PhpStorm并调试PHP脚本/网页,这已经做了好几次了。

这是我的php.ini文件(有趣的是):

[xdebug]
zend_extension=C:\xampp\php\ext\php_xdebug.dll
xdebug.remote_enable=1
xdebug.remote_port=10000
xdebug.remote_mode=req

我设置了多个断点并调用xdebug_break()了我的索引,但是代码执行并未在它们处停止。

这是Xdebug的PhpStorm验证脚本输出:
这是Xdebug的PhpStorm验证脚本输出

netstat的输出显示PhpStorm正在侦听端口10000:
netstat的输出显示PhpStorm正在侦听端口10000

Questioner
granitba
Viewed
0
Rijad Morina 2020-12-01 23:37:26

将php.ini中的行更改为

xdebug.mode=debug

并将PhpStorm上的端口设置为侦听9003而不是9000。

在xdebug v3中,默认的xdebug端口已更改为9003:https ://xdebug.org/docs/upgrade_guide#Step-Debugging