xdebug vim plugin doesn't show variable values (php)

孤者浪人 提交于 2019-12-10 11:25:57

问题


I'm on Ubuntu 10.04 LTS

vim version 7.2.330

xdebug vim plugin version 1.1.1 (downloaded from http://www.vim.org/scripts/script.php?script_id=1929)

PHP 5.3.2

Apache/2.2.14

Xdebug v2.0.5

I have these options in my /etc/php5/apache2/php.ini file

[debug]
; Remote settings
xdebug.remote_autostart=off
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000

; General
xdebug.auto_trace=off
xdebug.collect_includes=on
xdebug.collect_params=off
xdebug.collect_return=off
xdebug.default_enable=on
xdebug.extended_info=1
xdebug.manual_url=http://www.php.net
xdebug.show_local_vars=0 (tried with 1, same result)
xdebug.show_mem_delta=0
xdebug.max_nesting_level=100
;xdebug.idekey=

; Trace options
xdebug.trace_format=0
xdebug.trace_output_dir=/tmp
xdebug.trace_options=0
xdebug.trace_output_name=crc32

; Profiling
xdebug.profiler_append=0
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=0
xdebug.profiler_output_dir=/tmp
xdebug.profiler_output_name=crc32

When I press F12 to show variable content, instead of showing it like for example on this image http://2bits.com/sites/2bits.com/files/vim-debug-displaying-variables.png (top right window) I get this /*{{{1*/ => property_get: file when I press F12 on $file var.

I also tried the version that is attached to this article http://2bits.com/articles/using-vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html

Same result.

I also found almost the same unanswered question here xdebug does not show the content of array?

Thank you in advance for any advice


回答1:


Edit debugger.vim file (~/.vim/plugin/debugger.vim) and find a line similar to

let g:debuggerMaxDepth = 1

increase the depth varibale to a reasonable amount (5 should be enough) save and restart vim.




回答2:


This doesn't really answer your xdebug question, but for simple variable contents checking I found FirePHP quite useful.



来源:https://stackoverflow.com/questions/5467673/xdebug-vim-plugin-doesnt-show-variable-values-php

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