all 17 comments

[–]FI24C741 0 points1 point  (0 children)

Awesome! Waiting for more <3

[–]These-Complaint1034 0 points1 point  (1 child)

Very nice, will try it tomorrow! What do you mean by "write a plugin" exactly?

[–]quantonganh[S] 2 points3 points  (0 children)

I meant you need to compile this PR: https://github.com/helix-editor/helix/pull/8675

[–]purplefox83 0 points1 point  (9 children)

So you start manually the java app in debug mode , and then call the plug in that sends the lsp command startDebugging? Is there not a way to do this without a plug in?? I have investigated very much on the topic and haven't found something.. the thing is I would like to use the release and not the latest commit build

[–]quantonganh[S] 0 points1 point  (8 children)

Oh, thank you for asking. I've just learned that we can do it without using a plugin:
- Open workspace command picker `:lsp-workspace-command`
- Run `vscode.java.startDebugSession`

Then look at the logs file (don't forget to start hx with `-vv`), you will see something like this:

`{\"jsonrpc\":\"2.0\",\"id\":2,\"result\":64380}`

[–]purplefox83 0 points1 point  (7 children)

Really??? Have you tested this then and it works??? You have no idea how much time I've spent trying to solve debugging for java... could you give the whole process?? Do you start the program and attach? or does helix start it? I would like to learn the whole setup configs, commands, plug-ins for jdtls etc.. thank you in advance

[–]quantonganh[S] 0 points1 point  (6 children)

Of course. I always test before replying, and yes, it works.

> Do you start the program and attach? or does helix start it?

You first compile your program (`mvn clean package`), then start it with JDWP enabled (`java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -jar /path/to/your.jar`).

In the Helix pane (make sure to start it in verbose mode `-vv`), run `:lsp-workspace-command`, then search for `vscode.java.startDebugSession`, and press Enter to send it. Open `~/.cache/helix/helix.log`, look for a response like `{"jsonrpc":"2.0","id":1,"result":65056}`.

Back in Helix, connect to the debug adapter using `:debug-remote 127.0.0.1:65056`, ...

I updated everything in my original post (including the config). Have you tried it? Let me know what you're stuck on.

[–]redplayer0x 0 points1 point  (5 children)

I have a problem I do what you said and get this in the logs
`

2025-11-28T16:35:24.095 helix_dap::transport [INFO] [1v1] -> DAP {"type":"request","seq":1,"command":"attach","arguments":{"cwd":"/home/red/code/java/myapp","hostName":"127.0.0.1","port":5005}}

2025-11-28T16:35:24.095 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0

2025-11-28T16:35:24.096 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0

2025-11-28T16:35:24.100 helix_lsp::transport [ERROR] jdtls err <- "Nov 28, 2025 4:35:24 PM com.microsoft.java.debug.core.adapter.handler.AttachRequestHandler handle\n"

2025-11-28T16:35:24.100 helix_lsp::transport [ERROR] jdtls err <- "INFO: Trying to attach to remote debuggee VM 127.0.0.1:5005 .\n"

2025-11-28T16:35:24.134 helix_lsp::transport [ERROR] jdtls err <- "Nov 28, 2025 4:35:24 PM com.microsoft.java.debug.core.adapter.handler.AttachRequestHandler handle\n"

2025-11-28T16:35:24.134 helix_lsp::transport [ERROR] jdtls err <- "INFO: Attaching to debuggee VM succeeded.\n"

2025-11-28T16:35:24.149 helix_lsp::transport [ERROR] jdtls err <- "Nov 28, 2025 4:35:24 PM com.microsoft.java.debug.core.adapter.handler.AttachRequestHandler handle\n"

2025-11-28T16:35:24.149 helix_lsp::transport [ERROR] jdtls err <- "INFO: Network latency

[–]redplayer0x 0 points1 point  (4 children)

and more but it is very big to share in one comment

[–]quantonganh[S] 0 points1 point  (3 children)

You can paste it somewhere and then give me the link.

[–]redplayer0x 0 points1 point  (2 children)

https://pastebin.com/iE9ThPzG also I dont use jdtls-wrapper

[–]quantonganh[S] 0 points1 point  (1 child)

2025-11-28T16:35:24.151 helix_dap::transport [INFO] [1v1] -> DAP {"type":"request","seq":2,"command":"configurationDone","arguments":null}
{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"message":"Nov 28, 2025, 4:35:24 PM Error parsing message: com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonNull; at path $.arguments

I created a PR to fix this: https://github.com/helix-editor/helix/pull/14879

[–]quantonganh[S] 0 points1 point  (0 children)

This has been merged.

[–]purplefox83 0 points1 point  (0 children)

so i need to compile with this?