配置xdebug让php支持断点调试
到http://xdebug.org/download.php选择自己需要的xdebug版本。
下载并解压到自己需要的位置。
在php.ini中加入
zend_extension_ts="你的php根目录/ext/php_xdebug.dll"
如果不行改用
zend_extension="你的php根目录/ext/php_xdebug.dll"
然后重启iis或者apache通过phpinfo()输出并查找xdebug是否被成功加载。
完成以上步骤后只是成功加载了xdebug扩展,如果要支持断点调试还需要配置一下xdebug。
在php.ini中加入
;xdebug配置 [Xdebug] ;开启自动跟踪 xdebug.auto_trace = On ;开启异常跟踪 xdebug.show_exception_trace = On ;开启远程调试自动启动 xdebug.remote_autostart = On ;开启远程调试 xdebug.remote_enable = On ;收集变量 xdebug.collect_vars = On ;收集返回值 xdebug.collect_return = On ;收集参数 xdebug.collect_params = On xdebug.trace_output_dir="e:/wamp/bin/php/debuginfo" xdebug.profiler_enable=On xdebug.profiler_output_dir="e:/wamp/bin/php/debuginfo" xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_handler=dbgp
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步