php 的 PhpStorm xdebug 配置
PhpStorm xdebug configuration for php
在 Windows 10 上安装 Xdebug 并使用 php --version
命令测试后,我得到以下输出:
C:\xampp\htdocs\instacheeta>php --version
PHP 7.2.4 (cli) (built: Mar 28 2018 04:46:46) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.7.0alpha1, Copyright (c) 2002-2018, by Derick Rethans
之后我通过单击在 PhpStorm 中启用 debug
模式: , enabling Firefox XDebug
addons: 然后在 PhpStorm 上设置断点我希望它能正常工作并在我的断点处停止。
但是有一个问题,当我打开 Validate debugger configuration
对话框时我无法验证调试器配置
更新:
我的网络应用程序在 8000
端口上工作,IP 地址为 http://127.0.0.1
,我的网络应用程序文件夹在 C:\xampp\htdocs\instacheeta
路径中
问题解决
我将 xdebug
设置更改为 php.ini
为:
zend_extension=xdebug
[XDebug]
xdebug.remote_autostart=1
xdebug.default_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_enable =1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
并在 settings->PHP->Debug->DBGP
的 PHPStorm 设置上添加 PHPSTORM
IDE 键
在 Windows 10 上安装 Xdebug 并使用 php --version
命令测试后,我得到以下输出:
C:\xampp\htdocs\instacheeta>php --version
PHP 7.2.4 (cli) (built: Mar 28 2018 04:46:46) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.7.0alpha1, Copyright (c) 2002-2018, by Derick Rethans
之后我通过单击在 PhpStorm 中启用 debug
模式:XDebug
addons:
但是有一个问题,当我打开 Validate debugger configuration
对话框时我无法验证调试器配置
更新:
我的网络应用程序在 8000
端口上工作,IP 地址为 http://127.0.0.1
,我的网络应用程序文件夹在 C:\xampp\htdocs\instacheeta
路径中
问题解决
我将 xdebug
设置更改为 php.ini
为:
zend_extension=xdebug
[XDebug]
xdebug.remote_autostart=1
xdebug.default_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_enable =1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
并在 settings->PHP->Debug->DBGP
PHPSTORM
IDE 键