nvim-metals
nvim-metals copied to clipboard
Breakpoints do not work when running tests
Describe the bug
Hello,
I'm having trouble getting breakpoints to work when running tests.
They work fine when running a main class.
video example
https://user-images.githubusercontent.com/1673880/235112049-2b2ba281-46c2-4e05-aa05-63df84bd0c6d.mov
However when running a test, the debugger stop, but nothing shows up in the dap ui (frames, scopes etc.). When I resume the session the test runner resumes normally.
video example
https://user-images.githubusercontent.com/1673880/235112325-928ea4d1-1fa3-4f99-939e-a049e34bcfc4.mov
Everything works fine in VSCode:
video example
https://user-images.githubusercontent.com/1673880/235113168-93f206ef-c7c4-4542-8651-c3202e3110a8.mov
In another repository I get a "breakpointRejected" message, but I couldn't find any information about where that can come from.
Expected behavior
the debugger should stop at breakpoints normally when running tests.
Operating system
macOS
Version of Metals
https://github.com/scalameta/metals/commit/24790ce3576cc938d1cf7e46b99e5b7415e754d6
Commit of nvim-metals
26968e2768ffd59f7dcc26693c534ca91a80c928
Thanks for the report @kimlai. I'll need to dig in and look at the DAP communication for this to see what's going on. I'll report back when I have some time to look at it.