Closed takase1121 closed 1 year ago
The Java Debug Adapter is special in that it requires communication with the LSP-side. There might be work necessary in LSP-jdtls in addition to support JUnit in Sublime Debugger.
This was implemented in the latest LSP-jdtls release. However, something is currently broken in Debugger, see #204.
Fixed with the latest release. This can be closed @daveleroy
hmmm still facing the issue when trying to run any kind of JUnit tests via LSP-jdtls with the debugger open...
Unable to start adapter: Unable to connect to LSP client (timed out)
Debugger: v0.9.3 LSP: v1.22.0 LSP-jdtls: v2.0.0
Can you post your ST console log and LSP log?
This might just be timing out I think the timeout is something short like 2.5 seconds which could be increased
This might just be timing out I think the timeout is something short like 2.5 seconds which could be increased
Yeah, that sounds like it. Any hint how I can extend the timeout in my setup (just to cross check)?
Open your Packages directory. Then edit this line https://github.com/daveleroy/sublime_debugger/blob/master/modules/adapters/util/lsp.py#L25 in the Debugger package. Then restart ST.
I can't figure out a way to debug a JUnit test. I use JUnit 5 as a standalone jar file and I can't figure out how to launch it.
I went and poke around nvim-jdtls' code to find that there's a command to get the appropriate JUnit test command to run (which you can later attach to) but I have no idea how that would work with sublime debugger.
Here's the relevant nvim-jdtls command:
https://github.com/mfussenegger/nvim-jdtls/blob/cc59c194b3c6371e940b8aba9146a068b8035dee/lua/jdtls.lua#L256-L267