hbuilder 配置 xdebug 调试 php

来源:互联网 发布:浙江旅游数据 编辑:程序博客网 时间:2024/05/21 08:48

初学php. 因为之前学习前端用了hbuilder, 发现此工具也支持php, 就顺手用了它, 配置xdebug

当然首先hbuilder要安装php插件,

1. 下载安装xdebug

下载地址: https://xdebug.org/download.php

找到自己需要的版本, 下载, 然后放到php安装目录下的ext目录下即可, 然后进行配置

[Xdebug];你的xdebug文件路径,不要有空格和中文名之类的就不用再多说了。。zend_extension=D:/PHP/php-5.4.29-Win32-VC9-x86/php_xdebug-2.2.5-5.4-vc9.dll;开启自动跟踪xdebug.auto_trace = Off;开启异常跟踪xdebug.show_exception_trace = Off;开启远程调试自动启动xdebug.remote_autostart = On;开启远程调试xdebug.remote_enable = On;收集变量xdebug.collect_vars = Off;收集返回值xdebug.collect_return = Off;收集参数xdebug.collect_params = Offxdebug.trace_output_dir="D:/PHP/php-5.4.29-Win32-VC9-x86/Projecs"xdebug.profiler_enable=Offxdebug.profiler_output_dir="D:/PHP/php-5.4.29-Win32-VC9-x86/Projecs"xdebug.remote_host=localhostxdebug.remote_port=9000xdebug.remote_handler=dbgp

2. 配置 hbuilder

工具 --> 选项 --> HBuilder --> 编辑器 --> PHP --> Debug, 将其中的port改为与php.ini文件中的一致, 然后重启服务器即可, 之后打断点的时候就可进入了



1 0
原创粉丝点击