Replies: 3 comments
-
Looks like there's an issue with the junit5 dependencies in your project. If you use
Your dependencies only include the junit-jupiter-api. If you change the dependencies to the following it should work.
|
Beta Was this translation helpful? Give feedback.
-
Thanks! Your solution works, but I'll share some details because it can be helpful for someone else. |
Beta Was this translation helpful? Give feedback.
-
I did the following experiment. I downloaded a project from Spring Initializr that uses Gradle as a build tool. At this point, I could successfully debug a test method (with
@Test
annotation) by setting a breakpoint and running the:lua require'jdtls'.test_nearest_method()
command. It worked as I expected.However, without SpringBoot support, I can't do the same because the
:lua require'jdtls'.test_nearest_method()
command ignores the breakpoints. But, I found another way by remotely connecting the debugger to the Gradle (see the gif bellow).My question is: There is another way to do the same process? I think my approach requires a lot of work to debug JUnit methods.
Here is my ~/.config/nvim/ftplugin/java.lua file
The function
attach_to_debug()
command is defined as follows:Here is the project to test.
Beta Was this translation helpful? Give feedback.
All reactions