【问题标题】:How do you capture vim debugger output to a file or register?如何将 vim 调试器输出捕获到文件或寄存器?
【发布时间】:2020-09-19 22:47:06
【问题描述】:

我正在调试一个 vim 脚本:

:breakadd here
:redir >somefile.txt
:so %

预期输出:

   Entering Debug mode.  Type "cont" to continue.
    /some/path/somescript.vim
    line 327: execute 'echom ' .  "'done'"
    >step
    /some/path/somescript.vim
    line 327: echom 'done'
    >step
    done
    /some/path/somescript.vim
    line 335: End of sourced file
    >finish
:redir END
:e somefile.txt

相反,我得到:

 -- INSERT --

    1 line less; before #1  1 second ago
    1 line less; before #1  1 second ago
    Already at oldest change

    Breakpoint in "/some/path/somescript.vim" line 327
    done

解决方法 - 现在只需使用鼠标或 scriptease 复制并粘贴输出。

:Verbose messages

【问题讨论】:

  • 或许this的回答会有所帮助
  • Vim 配置文件?我不想看到哪些脚本减慢了我的 vim。我想将来自:debugbreakadd here 的调试消息输出到一个文件中。解决方法是只做详细消息,:v\line\d 删除所有我不想要的行。

标签: vim


【解决方案1】:

解决方法是使用:Verbose messages

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-12-02
    • 1970-01-01
    • 1970-01-01
    • 2011-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多