Ⅰ. 插件描述
a remote debugger interface to the DBGp protocol (tested only with XDebug/PHP)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ludovicpelle/vim-xdebug'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ludovicpelle/vim-xdebug'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ludovicpelle/vim-xdebug'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ludovicpelle/vim-xdebug
Ⅳ. 文档说明
# Vim-Xdebug
This vim plugin provides a debugger interface to DBGp protocol, and therefore
Xdebug (only tested on Xdebug 2).
This is a fork of this plugin, which
is a bit buggy, limited is many ways and not maintained anymore.
Installation
Requirements:
- Vim compiled with Python (2) support
- DBGp protocol enabled debugging module, such as Xdebug.
Classic
Clone or download a tarball of the plugin and move its content in your~/.vim/ directory.
Your ~/.vim/plugins/ directory should now have two more files: debugger.py
and debugger.vim.
Using git and Pathogen
Clone this repository in your ~/.vim/bundle directory (and yeah, you're done).
Quick guide
- setup Xdebug - or other DBGp enabled server - correctly (with proper remote
debug option) - press
F5to make Vim wait for a debugging connection and browse your PHP
file (you have five seconds to do it once you pressF5).All the currently opened windows will be closed and debugging interface
will appear. Once in debugging mode, the following mappings are available:
<F1>: resizing windows<F2>: step into<F3>: step over<F4>: step out<F6>: stop debugging<F11>: shows all variables<F12>: shows variable on current cursor,e: evaluate an expression and display the result
- To stop debugging, press
<F6>
Notes
- You'll see some python's exception message. They happen when connection is
closed, because Xdebug doesn't send message for last file/line information. - This plugin doesn't implement all DBGP's features, just the very essential
parts.
Contributors
- Ludovic Pelle <ludovic_pelle AT carpe-hora.com>
- Kévin Gomez <contact AT kevingomez.fr>
- Sam Ghods <sam AT box.net>
- Seung Woo Shin <segv AT sayclub.com>
Licence
The MIT/Expat licence.