Ⅰ. 插件描述
rdebug implementation for vim based on vim-addon-asyncⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'marcweber/vim-addon-rdebug'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'marcweber/vim-addon-rdebug'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'marcweber/vim-addon-rdebug'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/marcweber/vim-addon-rdebug
Ⅳ. 文档说明
Note: try [1] first and only use this plugin if you can't get ruby-debug-ide to
work
minimal rdebug debugging support based on vim-addon-async.
- rspec/ruby will be suggested depending on whether the current file contains
"describe" - -rdebug is only suggseted as argument if the current file does not contain
require "rdebug" to start the debugger.
usage:
add require 'debug' to your ruby project, then run:
AsyncRubyRDebug ruby file.rb
Then you can use F5,F6, ... to step and set breakpoints
(see plugin/vim-addon-rdebug.vim)
You can pass input to debug process, see documentation of vim-addon-async
If something doesn't work contact me.
related work
github.com/MarcWeber/vim-addon-ruby-debug-ide [1]
https://github.com/astashov/vim-ruby-debugger (fails for me stepping 20 times)
There are some more debugger script at www.vim.org which work with any
commandline related debugger or can be extended to work with those.
I haven't tried them. Example:
http://www.vim.org/scripts/script.php?script_id=1703
installation:
get github.com/MarcWeber/vim-addon-manager, and add 'vim-addon-rdebug' to the
list of plugins to be activated on startup. Read its documention.
It also talks about alternative and references Vim's help file about what the
old way of installing plugins was.
OR
use any other way and install this plugin along with the plugins mentioned in
the dependency section of ./addon-info.json (which all can be found on
github.com/MarcWeber).
BUGS:
- no threading support yet
- no support for debugging vars, but expecting vars by runing rdebug commands
works (type text, visually select and hit <cr>), see vim-addon-async's
documentation for details
- if exception traces are logged vim sometimes interpretes them as "execution
instruction" and jumps to that location.
A simple F6 (next instruction) will take you back
- probably this all is based on the wrong API - I should use what Eclipse,
netbeans etc are using (ruby-debug?) - but it works for me.
- sometimes a debug process seems to continue running with 100% CPU utilization.
Kill it manually
support for multiple processes is started but not complete