#neovim #debugging
# Debugging in neovim
Using vimspector https://github.com/puremourning/vimspector
> or not? lunarvim seems to have a version of a debug inspector. Might already be vimspector?
- lunarvim uses nvim-dap
## Rust
- `:h dap-configuration`
- neovim DAP plugin https://github.com/mfussenegger/nvim-dap
- cpptools DAP server https://github.com/microsoft/vscode-cpptools?tab=readme-ov-file
- debug configuration https://code.visualstudio.com/docs/cpp/launch-json-reference
- *must create a debug configuration like the example in `:h dap-configuration`*
From `:h dap-configuration`
- Some variables are supported:
- `${file}`: Active filename
- `${fileBasename}`: The current file's basename
- `${fileBasenameNoExtension}`: The current file's basename without extension
- `${fileDirname}`: The current file's dirname
- `${fileExtname}`: The current file's extension
- `${relativeFile}`: The current file relative to |getcwd()|
- `${relativeFileDirname}`: The current file's dirname relative to |getcwd()|
- `${workspaceFolder}`: The current working directory of Neovim
- `${workspaceFolderBasename}`: The name of the folder opened in Neovim
- `${command:pickProcess}`: Open dialog to pick process using |vim.ui.select|
- `${env:Name}`: Environment variable named `Name`, for example: `${env:HOME}`.