如何在PhpStorm中使用Xdebug

2 php phpstorm

我在我的代码中使用调试器时遇到了麻烦,这是我第一次使用调试器,我不知道我是以正确的方式做到了,但它对我不起作用.它总是在变量部分显示此消息...

使用ide键'13001'等待传入连接

我跟着这一步......

1.我的xdebug的php.ini设置

[Xdebug]
zend_extension="D:\XAMMPI\php\ext\php_xdebug-2.4.0-5.6-vc11.dll"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=80 //i also try the default port (9000) here but it still not working
xdebug.idekey=PHPSTORM
Run Code Online (Sandbox Code Playgroud)

2.我为Debugger创建配置设置.

配置设置

3.我将断点应用于代码进行测试

断点的地方

我正在使用PhpStorm 2016.1

任何帮助将不胜感激

更新 - 1

在此输入图像描述

sci*_*eon 5

只需使用我的php.ini设置xdebug

[XDebug]
zend_extension="D:\XAMMPI\php\ext\php_xdebug-2.4.0-5.6-vc11.dll" ; copied this link based on your config.
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=10000
xdebug.remote_autostart=1
xdebug.idekey=
Run Code Online (Sandbox Code Playgroud)

然后为chrome 安装xDebug helper:

https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc?hl=en

然后将IDE密钥更改为phpstorm 将IDE密钥更改为phpstorm

之后,您应该创建PHP远程调试而不是PHP Web应用程序

如下图所示.

在此输入图像描述

在你的设置上.哪个可以使用Ctrl+Alt S.搜索调试端口,并将其更改为10000.

在此输入图像描述

之后,您应该在chrome中导航到您的扩展程序并激活xDebug.

在此输入图像描述

就是这样.快乐调试:)