【问题标题】:Vim and Xdebug issueVim 和 Xdebug 问题
【发布时间】:2014-04-10 15:05:28
【问题描述】:

好的,我有一个问题。我在旧系统 ubuntu 9.04 上,所以我没有能力在 vim 上做 apt-get,所以我去了 vim 网站并下载了最新版本的 vim。

Xdebug 也是如此,它已全部安装并显示在我的 phpinfo() 调用的输出中,所以一切都很好,将 debugger.py 和 debuger.vim 放在我的 /etc/vim/plugin 文件夹中,确实在 .vim/plugin 中有它,但这也不起作用。

所以我在终端中使用要调试的文件名运行 vim 命令,vim 可以正常打开它,但是当我在浏览器中打开它然后在 vim 上按 5 时,它什么也没做。没有来自 vim 的消息,我在我的 url 中添加了 feature&XDEBUG_SESSION_START=1 并再次尝试,仍然没有来自 vim,任何想法可能是什么问题?

更新

所以我将这些文件复制到 /usr/local/vim/vim64/plugin 目录,因为所有插件似乎都存储在我的系统上,现在启动 Vim 时出现此错误。我使用的是 vim 6.4,也许这个插件是旧版本的?

Error detected while processing /usr/local/share/vim/vim64/plugin/debugger.vim:
line    1:
E488: Trailing characters: # -*- c--oding: ko_KR.UTF-8 -*-
line    2:
E488: Trailing characters: # remote PHP debugger : remote debugger interface to DBGp protocol
  1  
line    4:
E488: Trailing characters: # Copyright (c) 2003-2006 ActiveState Software Inc.
  1  
line    6:
E488: Trailing characters: # The MIT License
  1  
line    8:
E488: Trailing characters: # Permission is hereby granted, free of charge, to any person obtaining
line    9:
E488: Trailing characters: # a copy of this software and associated documentation files
line   10:
E488: Trailing characters: # (the
line   11:
E488: Trailing characters: # including without limitation the rights to use, copy, modify,
line   12:
E488: Trailing characters: # merge, publish, distribute, sublicense, and/or sell copies of the
line   13:
E488: Trailing characters: # Software, and to permit persons to whom the Software is furnished
line   14:
E488: Trailing characters: # to do so, subject to the following conditions:
  1  
line   16:
E488: Trailing characters: # The above copyright notice and this permission notice shall be included
line   17:
E488: Trailing characters: # in all copies or substantial portions of the Software.
  1  
line   19:
E488: Trailing characters: # THE SOFTWARE IS PROVIDED
line   20:
E488: Trailing characters: # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
line   21:
E488: Trailing characters: # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
line   22:
E488: Trailing characters: # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
line   23:
E488: Trailing characters: # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
line   24:
E488: Trailing characters: # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
line   25:
E488: Trailing characters: # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  1  
  1  
line   28:
E488: Trailing characters: # Authors:
line   29:
E488: Trailing characters: #    Seung Woo Shin <segv <at> sayclub.com>
line   30:
E488: Trailing characters: #    Sam Ghods <sam <at> box.net>
line   33:    
E492: Not an editor command: ^Idebugger.py -- DBGp client: a remote debugger interface to DBGp protocol
line   35:
E492: Not an editor command:     Usage:
line   36:
E492: Not an editor command:         Use with the debugger.vim vim plugin
line   38:
E492: Not an editor command:     This debugger is designed to be used with debugger.vim,
line   39:
E488: Trailing characters: ^Ia vim plugin which provides a full debugging enviroVim:     Caught deadly signal SEGV

Vim: Finished.
Segmentation fault

【问题讨论】:

    标签: vim xdebug


    【解决方案1】:

    看起来您的旧 Vim 6.4 正在采购 plugin/debugger.py 文件,因为它抱怨 Python # cmets,而不是将其提供给 Python 解释器。 XDebug plugin page 列出了所需的最低 Vim 版本为 7.0;如果这是正确的,您可能必须升级您的 Vim 版本(这也有很多其他原因,并且在 Ubuntu 上编译您自己的 Vim 版本并不是那么困难),或者严重破解插件(例如尝试移动debugger.py 文件别处,并调整 debugger.vim 中的路径。

    【讨论】:

    • 谢谢!我刚刚从他们的网站上获取了最新版本的 Vim,现在所有错误都消失了,但是当我用 Vim 打开文件并按 f5 时,什么也没有发生。我正在尝试通过全新安装较新版本的 Ubuntu 来尝试这个过程,看看我是否可以先让它在那里工作。
    猜你喜欢
    • 1970-01-01
    • 2011-05-30
    • 1970-01-01
    • 2020-04-30
    • 1970-01-01
    • 2015-04-15
    • 1970-01-01
    • 2011-07-31
    • 2011-01-15
    相关资源
    最近更新 更多