xdebug.remote_handler set in PHP.INI, but not showing in PHPinfo

只谈情不闲聊 提交于 2021-01-29 14:31:03

问题


I am trying to get Xbdebug to run with NetBeans, in order to debug some PHP code (I am sure that I had it working a few years back, then switched IDE & now want to switch back).

When I try to debug, the status bar shows

And, when it doesn't hit a breakpoint on line one of a simple echo('hello'); file, and I stop debugging, it shows

Please note that I have XDEBUG_SESSION_START=netbeans-xdebug in my parameters, but I don't think that that is the problem (yet).

Instead, look at the message above concerning Xdebug settings.

In my php.inin file, I have

[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, when I look at PHPinfo, there is no setting for xdebug.remote_handler - any idea why?

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

回答1:


when I look at PHPinfo, there is no setting for xdebug.remote_handler - any idea why?

It is normal. The xdebug.remote_handler option had been removed in Xdebug 2.9.0. Internally it now ALWAYS equal to be dbgp.

Fixed bug #1720: Remove superfluous xdebug.remote_handler setting

  • https://xdebug.org/docs/all_settings#remote_handler
  • https://xdebug.org/updates#x_2_9_0
  • https://github.com/xdebug/xdebug/commit/3e74cb6776bffd94a6636e6f76c39b8efad57789


来源:https://stackoverflow.com/questions/63204455/xdebug-remote-handler-set-in-php-ini-but-not-showing-in-phpinfo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!