首页 » SEO优化 » PHP注释xdebug技巧_真正的实用功能phpstrom加xdebug设备进行断点调试

PHP注释xdebug技巧_真正的实用功能phpstrom加xdebug设备进行断点调试

访客 2024-12-03 0

扫一扫用手机浏览

文章目录 [+]

XAMPP、phpStorm 都直接安装在了D盘根目录,9999m目录建在D:\xampp\htocts下,即目录工程文件夹路径为D:\xampp\htocts99m。
在phpStorm>File>open,找到9999m,点击确定,加载9999m到了phpStorm(安装环境路径根据须要自行变动,后面的配置内容也类似)。

1. 开始做事器端配置:安装好XAMPP,停滞apache做事(把稳,如果直接退出XAMPP,是不会停滞apache的)。

PHP注释xdebug技巧_真正的实用功能phpstrom加xdebug设备进行断点调试 PHP注释xdebug技巧_真正的实用功能phpstrom加xdebug设备进行断点调试 SEO优化

2. 在安装目录下找到php.ini,类似于D:\xampp\php\php.ini,并打开。

PHP注释xdebug技巧_真正的实用功能phpstrom加xdebug设备进行断点调试 PHP注释xdebug技巧_真正的实用功能phpstrom加xdebug设备进行断点调试 SEO优化
(图片来自网络侵删)

3. 找到被注释掉的项目(去掉前面的?)并按如下设置:

[XDebug]

==============原代码

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\"大众

;zend_extension=\公众D:\phpStudy\php53n\ext\xdebug.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\"大众

zend_extension=\"大众D:\phpStudy\php53n\ext\xdebug.dll\"大众

xdebug.idekey= PHPSTROM

====================转载的

zend_extension = \公众D:\xampp\php\ext\php_xdebug.dll\"大众

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_dir = \公众D:\xampp\tmp\"大众

xdebug.profiler_output_name = \"大众cachegrind.out.%t-%s\"大众

xdebug.remote_enable = on

xdebug.remote_handler = \"大众dbgp\"大众

xdebug.remote_host = \"大众127.0.0.1\"大众

xdebug.trace_output_dir = \"大众D:\xampp\tmp\公众

xdebug.idekey= PHPSTROM

最初的设置是这样的:图2

;的意思是被注释掉了,以是要先去掉;号;

然后开启xdebug.remote_enable = on;

还要增加xdebug.idekey= PHPSTROM。

个中remote_host 是指调试客户真个地址,即IDE所在的IP,同理remote_port 是客户真个端口,这两项在远程调试的情形下把稳修正,远程的时候终极改为:

[XDebug]

zend_extension = \"大众D:\xampp\php\ext\php_xdebug.dll\"大众

xdebug.profiler_append = 0

xdebug.profiler_enable = 1

xdebug.profiler_enable_trigger = 0

xdebug.profiler_output_dir = \"大众D:\xampp\tmp\公众

xdebug.profiler_output_name = \"大众cachegrind.out.%t-%s\"大众

xdebug.remote_enable = 1

xdebug.remote_handler = \"大众dbgp\"大众

xdebug.remote_mode = \"大众req\公众

xdebug.remote_port = 9000

4. 保存文件,重新启动apache检讨是否成功开启了xdebug做事。

一种方法为在CMD里输入D:\xampp\php\php.exe -m 看到XDebug,解释成功开启XDebug。

另一种方法为浏览器打开localhost,找到phpinfo()点击打开配置情形,查找xdebug项,找到相识释xdebug配置成功。

标签:

相关文章

C语言启动程序,编程世界的起点与探索

随着信息技术的飞速发展,编程已经成为了当今社会的一项重要技能。而C语言作为一门历史悠久的编程语言,以其简洁、高效、可移植性强等特点...

SEO优化 2024-12-05 阅读0 评论0

C语言程序之美,代码与逻辑的交响曲

在计算机科学的世界里,C语言被誉为“程序员的摇篮”。自1972年诞生以来,C语言以其简洁、高效、灵活等特点,赢得了无数程序员的青睐...

SEO优化 2024-12-05 阅读0 评论0

C语言还贷程序,金融科技助力智慧金融

随着金融科技的不断发展,越来越多的金融机构开始运用编程技术为用户提供便捷的服务。C语言作为一种高效、稳定的编程语言,在金融领域得到...

SEO优化 2024-12-05 阅读0 评论0