Member-only story
Neovim for Beginners — Java Debugging
We configure Neovim for Java development in the previous article. In this article, we will configure debugging for Java using nvim-dap
.
This article is part of the Neovim for Beginners series.
The Neovim configuration files can be found in this repository.
Getting Started
To support debugging, we need to install java-debug
and vscode-java-test
.
- For
java-debug
installation, follow the instructions here. - For
vscode-java-test
installation, follow the instructions here.
Alternatively, we can use the following Shell script.
The script installs the repositories under $HOME/.local/share/nvim
.
nvim-dap
Configuration
- In the
after/plugin/java.lua
file add the lines to configure the debugger location and configuration bundles.
- In the
lua/config/lsp/init.lua
file we need to set upjdtls
for debugging in theon_attach
method.
Testing
Debugging should work now. Let’s test out using the Spring Boot project.