lidulibai / coc-java-vimspector

An extension for coc.nvim to enable Java debugging via jdt.ls
MIT License
10 stars 1 forks source link

coc-java-vimspector gives error when trying to launch debugger on java file #1

Open Kan-Rup opened 2 years ago

Kan-Rup commented 2 years ago

Neovim version : v 0.6.0 OS : Debian GNU/Linux 11 (bullseye)

How to reproduce the issue

install coc.nvim install coc-java install coc-java-vimspector

(launch nvim) nvim.appimage MainClass.java (only one main class in the directory)

enter command ' :CocList mainClassListRun ' (F5 doesn't do anything)

select the only main class there is in the directory from the option given

(I have not made an ‘eclipse project’ for the Java file (as it says in the use section of https://github.com/lidulibai/coc-java-vimspector). this is just a .java and .class file in a directory. I don't know if I have ' Language Support for Java(TM) by Red Hat ' I don't have ext in my Debian machine.

Expected behaviour : The debugger window starts and I am able to use it.

Actual behaviour : [coc.nvim]: UnhandledRejection: request error nvim_eval - Vim:E117: Unknown function: vimspector#LaunchWithSettings Error at wF.request (/home/kaushan/.vim/plugged/coc.nvim/build/index.js:30:34430) at wF.eval (/home/kaushan/.vim/plugged/coc.nvim/build/index.js:33:3288) at Object.startVimspector (/home/kaushan/.config/coc/extensions/node_modules/coc-java-vimspector/lib/index.js:17703:38)

hope this is the right place for this issue.

lidulibai commented 2 years ago

Thanks!

  1. F5 doesn't do anything, add map f5 :CocCommand java.debug.debugFromProjectView<CR> this line to your vim/nvim config file. I forgot to update Readme.md.
  2. Unknown function, it seems that you do not install vimspector, see https://github.com/puremourning/vimspector
  3. coc-java need java support, can type :CocCommand workspace.showOutput and then choose java to see if JDT Language Server started