dansomething / coc-java-debug

An extension for coc.nvim to enable Java debugging via jdt.ls
https://www.npmjs.com/package/coc-java-debug
Eclipse Public License 2.0
102 stars 8 forks source link

Did the .vimspector json schema change? #11

Closed milind-shakya-sp closed 4 years ago

milind-shakya-sp commented 4 years ago

Getting the following error

The specified adapter 'java-debug-server' is not available. Did you forget to run 'install_gadget.py'?

My configuration is


{
  "adapters": {
    "java-debug-server": {
      "name": "vscode-java",
      "port": "${AdapterPort}"
    }
  },
  "configurations": {
    "Java Attach": {
      "adapter": "java-debug-server",
      "configuration": {
        "request": "attach",
        "host": "localhost",
        "port": "29220"
      },
      "breakpoints": {
        "exception": {
          "caught": "N",
          "uncaught": "N"
        }
      }
    }
  }
}```
dansomething commented 4 years ago

It appears that something has changed in Vimspector. According to the docs it should still be possible to set adapters in the .vimspector.json file.

You can then configure the adapter manually in the adapters section of your .vimspector.json or in a gadgets.json.

Can you try setting the adapters config in the Vimspector gadgets.json file as a workaround?

milind-shakya-sp commented 4 years ago

Did a quick test by adding the following to the .gadgets.json file. But did not help. Not sure if there any other configuration that coc-java-debug needs to follow?

"java-debug-server": {
      "name": "vscode-java",
      "port": "${AdapterPort}"
    }
dansomething commented 4 years ago

I would expect .gadgets.json to have the full adapters config just as it is in .vimspector.json.

{
  "adapters": {
    "java-debug-server": {
      "name": "vscode-java",
      "port": "${AdapterPort}"
    }
  }
}
opensourcegeek commented 4 years ago

I was hitting the same issue after upgrading plugins but the workaround suggested by @dansomething seems to be working.

milind-shakya-sp commented 4 years ago

Looks like I was updating the wrong .gadgets.json file. I had to create a new .gadgets.json file in the project root to get it working.

Thanks