-
Notifications
You must be signed in to change notification settings - Fork 48
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
Java debugger implementation disscussion #42
Comments
Hey! I was checking Feel free to PR it, it'd be awesome! |
Any updates? |
This is what I did to install java-debug, works on macOS and Linux (never tested, but should work, though the JAVA_HOME path might need to be amended) I couldn't compile it with Java 17, so I had to link it to the home directory of Java 11 function _G.install_javadebug()
local installation_path = vim.fn.stdpath("data") .. "/dapinstall/"
if vim.fn.isdirectory(installation_path) == 0 then
vim.fn.mkdir(installation_path)
end
installation_path = installation_path .. "/java-debug"
vim.fn.mkdir(installation_path)
local git_url = "https://github.com/microsoft/java-debug"
vim.fn.system({ "git", "clone", git_url, installation_path })
vim.cmd(
"split | terminal cd "
.. installation_path
.. " && JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home ./mvnw clean install"
)
end
function _G.uninstall_javadebug()
local installation_path = vim.fn.stdpath("data") .. "/dapinstall/java-debug"
vim.fn.delete(installation_path, "rf")
print("Java-debug uninstalled")
end
vim.cmd("command! DIInstallJava call v:lua.install_javadebug()")
vim.cmd("command! DIUninstallJava call v:lua.uninstall_javadebug()") Getting the debugger working with jdtls is a whole different story though as it involves installing the nvim-jdtls plugin, attaching it to the LSP and configuring some initialisation options |
Might be a stupid question but why not just get the artifact ? https://search.maven.org/artifact/com.microsoft.java/com.microsoft.java.debug.plugin I basically don't know lua, so I made a local PKGBUILD where I would get the latest version, getting the proper latest version was a pipe hell but it worked. It also seemed to work with java 18 EA. ( In the end I gave up and just installed eclipse-plaform with vrapper on my work laptop but I would like to reach a day when all this works similar to how lsps work on nvim ) |
So this should be straightforward (IMHO).
The implementation has been done by Microsoft, and I think the implementation here could be as straightforward as python for an example.
I want to contribute to this project since this is a great project in my opinion. Let me know if there is any opinion about this initial discussion
The text was updated successfully, but these errors were encountered: