DeBug调试插件
https://github.com/puremourning/vimspector
call plug#begin()Plug 'puremourning/vimspector'call plug#end()
:VimspectorInstall <language-name-debug>language-name-debug e.g.: python is debugpy ; go is delve
调试会话配置
项目的调试会话的文件位于以下两个位置:
/configurations/ / /*.json
**[nvim cmd]:set runtimeapth 查看 your-path-to-vimspector**
- 项目根目录中的 .vimspector.json
linux{"configurations": {"Python Current File": {"adapter": "debugpy","filetypes": [ "python" ],"configuration": {"name": "Python Current File","type": "python","request": "launch","cwd": ".","python": "./.env/bin/python", //python interpreter path"stopOnEntry": true,"console": "integratedTerminal","debugOptions": [],"program": "${file}"}}}}
Windows下{"configurations": {"run": {"adapter": "delve","filetypes": [ "go" ], // optional"variables": {// example, to disable delve's go version check// "dlvFlags": "--check-go-version=false"},"configuration": {"request": "launch","program": "${fileDirname}","mode": "debug"}}}}
{"configurations": {"run": {"adapter": "vscode-go","filetypes": [ "go" ],"configuration": {"request": "launch","program": "${fileDirname}","mode": "debug","dlvToolPath": "C:/Users/yzh/AppData/Local/nvim-data/plugged/vimspector/gadgets/windows/delve/bin/dlv.exe" //dlv local uri}}}}
