You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi Srinesh,
Thank you so much for creating the fantastic plugin. It has been incredibly helpful for debugging Java code in Neovim. I wanted to check if nvim-java also supports remote debugging, as it is another frequently used functionality. I tried running the command :lua require'dap.ext.vscode'.load_launchjs(nil, nil) to load the configurations from .vscode/launch.json. However, when I start the debugging process, I encounter the following error message:
Error executing vim.schedule lua callback: ...e/nvim/lazy/nvim-java-core/lua/java-core/utils/async.lua:41: u
stack traceback:
[C]: in function 'error'
...e/nvim/lazy/nvim-java-core/lua/java-core/utils/async.lua:41: in function 'callback'
...nvim-java-core/lua/java-core/ls/clients/jdtls-client.lua:72: in function 'handler'
....mount_nvimAJdFQy/usr/share/nvim/runtime/lua/vim/lsp.lua:1393: in function ''
vim/_editor.lua: in function <vim/_editor.lua: 0>
I would appreciate any guidance or suggestions you can provide to resolve this issue.
Thank you once again for your excellent work!
Best regards,
Xuanlei
Describe the solution you'd like
Support remote debugging.
Describe alternatives you've considered
Not sure.
Additional context
No response
Reacted by Nathaniel Schainblatt, Sander and Thomas Fehér
@s1n7ax To make this work we should modify the debug launch arguments. The request parameter should be eq to attach and requires two additional parameters:port and serverName.
Should these additional parameters be saved like profile parameters (gui with nui), or should we keep it simple and get the input via vim.fn.input without saving to the file (Im not sure how often remote debugging is used) ?
@atm1020@rahul-saini Thank you very much for your support. @atm1020 For my use case, as my application runs on GCP and I need to debug it on my local machine, I have to remote connect to GCP each time. This functionality is frequently used, so it's better to use a file for configuration. You can find this functionality in Intellij Remote Debug. Similarly, VSCode offers a similar functionality that can be configured in the launch.json. An example launch.json file is provided below:
I would like to use this, we're running our application within a Docker container and I have enabled debugger within it and am able to connect to it using Intellij IDEA, but wanted to do the same with Neovim. All changes I have tried try to launch a debug session instead of just attaching to the one I already have.
Activity
atm1020 commentedon Jul 2, 2024
@s1n7ax To make this work we should modify the debug launch arguments. The request parameter should be eq to
attachand requires two additional parameters:portandserverName.Should these additional parameters be saved like profile parameters (gui with nui), or should we keep it simple and get the input via
vim.fn.inputwithout saving to the file (Im not sure how often remote debugging is used) ?rahul-saini commentedon Jul 2, 2024
Hello,
And where and when those arguments are need to passed? in the configurations or when a popup is displayed when da is pressed?
xuanleilin commentedon Jul 3, 2024
@atm1020 @rahul-saini Thank you very much for your support.
@atm1020 For my use case, as my application runs on GCP and I need to debug it on my local machine, I have to remote connect to GCP each time. This functionality is frequently used, so it's better to use a file for configuration. You can find this functionality in Intellij Remote Debug. Similarly, VSCode offers a similar functionality that can be configured in the launch.json. An example
launch.jsonfile is provided below:{ "version": "0.2.0", "configurations": [ { "type": "java", "name": "Debug :my-server", "request": "attach", "hostName": "localhost", "port": 47757, "projectName": "my-server" }, { "type": "java", "name": "Debug :my-server:test", "request": "attach", "hostName": "localhost", "port": 5005, "projectName": "my-server" } ] }s1n7ax commentedon Jul 3, 2024
This is probably something already solved by overseer.nvim. I remember an issue from the author to request some features related to this
s1n7ax commentedon Jul 3, 2024
Let's see.
stevearc/overseer.nvim#323
dhruvasagar commentedon Aug 2, 2024
I would like to use this, we're running our application within a Docker container and I have enabled debugger within it and am able to connect to it using Intellij IDEA, but wanted to do the same with Neovim. All changes I have tried try to launch a debug session instead of just attaching to the one I already have.
dhruvasagar commentedon Aug 2, 2024
Actually I was able to get it to work with the launch.json, I just needed to set the correct 'projectName'