vimspector 的安装
- 如果是 vim-plug 管理 vim 插件的, 就简单的编辑 ~/.vimrc。在相应的位置增加如下行。
1
| Plug 'git@gitee.com:supermew/vimspector', { 'for':'python' }
|
- 启动 vim , 并运行 :PlugInstall
vimspector 的适配器安装
在 vim 中直接运行 `VimspectorInstall debugpy’
1
| :VimspectorInstall debugpy
|
vimspector 的调试配置
下面是我的调试配置, 因为我的使用情况较为简单, 如有需要在适当的调整。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| ~/.vim/plugged/vimspector/configurations/linux/python/debugpy.json ---
{ "configurations": { "launch-current-file":{ "adapter": "debugpy", "configuration": { "name":"launch-current-file: launch", "type": "debug", "request": "launch", "cwd": "${workspaceRoot}", "python":"/usr/bin/python3", "stopOnEntry":true, "console":"externalTerminal", "debugOptions":[], "program": "${file}", "breakpointers": { "exception": { "python_throw": "Y", "python_catch": "N" } } } } } }
|