-
-
Notifications
You must be signed in to change notification settings - Fork 54
Help needed: Can't find documentation to configure Java Attach to Process Debug #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is automatically configured when you open a Java file. If you want custom configuration then you have to use dap APIs to do so. It's not in the scope of this project. |
If what you are trying to say is that debug is not working out of the box, then i could look into it |
If attach to process configuration is automatically configured, how do I invoke it? :DapContinue only shows classes which have main method in them, and there's no debug configuration of attaching to a process |
The problem is that this plugin is overriding completely To fix this, instead of setting nvim-java/lua/java/dap/init.lua Line 108 in e8e8441
a better approach would be to local dap = require'dap'
dap.configurations.java = dap.configurations.java or {} -- define the array of configurations only if not previously defined
-- do this in a for loop for each discovered configuration
table.insert(dap.configurations.java, {
-- some discovered configuration
}) |
I would happily accept this PR |
Thanks for the help. I have updated the plugin, and now my custom configuration (Attach to process) shows up in the :DapContinue options. However, when I execute it, I get the following error:
I have gone through the Trobleshooting section and applied this: https://github.com/nvim-java/nvim-java/wiki/Troubleshooting#no_entry-to-enrich-the-config-xxx-should-already-be-present My configuration for reference: https://github.com/me-heer/nvim/blob/master/init.lua#L1056-L1065 |
nvim-jdtls (the other java plugin for nvim from the same creator of nvim-dap) seems to discover the main clases during |
I don't know if this helps, but the directory I am opening has multiple Java projects in the subdirectories. Also, I don't understand why there needs to be a main class (or class with a main method) altogether since I am going to use "Attach to Debug" in a Spring MVC project where there's no custom class with a main method. |
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.3
Operating system/version
MacOS 15.1.1
Describe the bug
I'm looking for an Attach to Process Configuration equivalent to the following VSCode Config:
But I can't find a way to configure it using nvim-java.
Here's my configuration (I have customized it starting from Kickstart): https://github.com/me-heer/nvim
Steps To Reproduce
Expected Behavior
NA
The text was updated successfully, but these errors were encountered: