我正在尝试让 Xbdebug 与 NetBeans 一起运行,以便调试一些 PHP 代码(我确信几年前我已经让它工作了,然后切换了 IDE,现在想切换回来)。
When I try to debug, the status bar shows
![enter image description here](https://i.stack.imgur.com/xw5fZ.png)
并且,当它没有到达简单行第一行的断点时echo('hello');
文件,我停止调试,它显示
请注意,我有XDEBUG_SESSION_START=netbeans-xdebug
在我的参数中,但我认为这不是问题(还)。
相反,请查看上面有关 Xdebug 设置的消息。
在我的 php.ini 文件中,我有
[PHP]
zend_extension=F:\DropBox\programs\xampp\php\ext\php_xdebug-2.9.6-7.4-vc15-x86_64.dll
xdebug.remote_enable=On
xdebug.remote_host=127.0.0.1
xdebug.remote_handler=dbgp <============== (arrow not in file, just shown here to help)
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_log=m:\xdebug.log
xdebug.profiler_enable = 0;
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir=f:\DropBox\programs\xampp\htdocs\_PHP_profile
xdebug.profiler_output_name=cachegrind.out.%s.%t
BUT,当我查看PHPinfo时,没有设置xdebug.remote_handler
- 知道为什么吗?
xdebug
xdebug support enabled
Version 2.9.6
Support Xdebug on Patreon, GitHub, or as a business
Debugger enabled
IDE Key me
Directive Local Value Master Value
xdebug.auto_trace Off Off
xdebug.cli_color 0 0
xdebug.collect_assignments Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.coverage_enable On On
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.file_link_format no value no value
xdebug.filename_format no value no value
xdebug.force_display_errors Off Off
xdebug.force_error_reporting 0 0
xdebug.gc_stats_enable Off Off
xdebug.gc_stats_output_dir C:\Windows\Temp C:\Windows\Temp
xdebug.gc_stats_output_name gcstats.%p gcstats.%p
xdebug.halt_level 0 0
xdebug.idekey no value no value
xdebug.max_nesting_level 256 256
xdebug.max_stack_frames -1 -1
xdebug.overload_var_dump 2 2
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_enable_trigger_value no value no value
xdebug.profiler_output_dir f:\DropBox\programs\xampp\htdocs\_PHP_profile f:\DropBox\programs\xampp\htdocs\_PHP_profile
xdebug.profiler_output_name cachegrind.out.%s.%t cachegrind.out.%s.%t
xdebug.remote_addr_header no value no value
xdebug.remote_autostart On On
xdebug.remote_connect_back Off Off
xdebug.remote_cookie_expire_time 3600 3600
xdebug.remote_enable On On
xdebug.remote_host 127.0.0.1 127.0.0.1
xdebug.remote_log m:\xdebug.log m:\xdebug.log
xdebug.remote_log_level 7 7
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.remote_timeout 200 200
xdebug.scream Off Off
xdebug.show_error_trace Off Off
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_enable_trigger Off Off
xdebug.trace_enable_trigger_value no value no value
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir C:\Windows\Temp C:\Windows\Temp
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3 3
当我查看 PHPinfo 时,没有 xdebug.remote_handler 设置 - 知道为什么吗?
这是正常的。这xdebug.remote_handler
选项是在 Xdebug 2.9.0 中删除。在内部它现在总是等于dbgp
.
修复了错误 #1720:删除多余的 xdebug.remote_handler 设置
- https://xdebug.org/docs/all_settings#remote_handler https://xdebug.org/docs/all_settings#remote_handler
- https://xdebug.org/updates#x_2_9_0 https://xdebug.org/updates#x_2_9_0
- https://github.com/xdebug/xdebug/commit/3e74cb6776bffd94a6636e6f76c39b8efad57789 https://github.com/xdebug/xdebug/commit/3e74cb6776bffd94a6636e6f76c39b8efad57789
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)