Currently, the language server is started with the command:
I suggest adding a boolean flag to the gradle plugin's configuration called development:
languageServer {
development = true // false by default
}
that when enabled adds the following jvm configuration to the language server process:
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005,quiet=y -jar <path_to_jar>
This way, editors can attach to the running process in port 5005 and enable debugging the language server.
I have successfully managed to do it from vscode by modifying the command manually.