PHPstorm XDBUG 安装

一:phpstudy集成环境。首先你要下载对应php版本的 XDbug文件(我是使用7.2版本)

二:你需要在php.ini 文件中配置,将原有的配置注释。

;以下xdbug配置

[XDebug]

zend_extension="D:\phpstudy\PHPTutorial\php\php-7.2.1-nts\ext\php_xdebug-2.7.0alpha1-7.2-vc15-nts.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.trace_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.profiler_output_name = "cache.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000
xdebug.remote_mode = "req"
xdebug.idekey = PHPSTORM
;注意这个autostart很关键,我就是加了这个才跑起来的
xdebug.remote_autostart=1

路径部分换成自己安装的路径

三:在phpstorm中配置

(如果没有server 就点击filter debug.... 创建一个。名字随意)

四:开启debug(右上角电话那个图标),然后随便打一个断点。运行项目。

猜你喜欢

转载自blog.csdn.net/icoo_lmj/article/details/85012696