Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'eth0jp/python-xdebug'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'eth0jp/python-xdebug'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'eth0jp/python-xdebug'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/eth0jp/python-xdebug
Ⅳ. 文档说明
Debug a call function::
xd = PyXdebug()
#xd.collect_imports = 1
#xd.collect_params = 0
#xd.collect_return = 0
#xd.collect_assignments = 0
xd.run_func(func)
print xd.get_result()
Debug a execute statement::
xd = PyXdebug()
xd.run_statement(statement)
print xd.get_result()
Debug a run script file::
python pyxdebug.py script_path
Debug a run script file (module)::
python -m pyxdebug script_path
Usage: pyxdebug.py [-o output_file_path] [-i collect_import] [-p collect_params] [-r collect_return] [-a collect_assignments] script_path [args ...]
Options:
-h, --help show this help message and exit
-o, --outfile Save stats to <outfile>
-i, --collect_imports
This setting, defaulting to 1, controls whether
PyXdebug should write the filename used in import or
reload to the trace files.-p, --collect_params This setting, defaulting to 0, controls whether
PyXdebug should collect the parameters passed to
functions when a function call is recorded in either
the function trace or the stack trace.-r, --collect_return This setting, defaulting to 0, controls whether
PyXdebug should write the return value of function
calls to the trace files.-a, --collect_assignments
This setting, defaulting to 0, controls whether
PyXdebug should add variable assignments to function
traces.