Code Monkey home page Code Monkey logo

Comments (6)

yyoncho avatar yyoncho commented on August 16, 2024

Can you do:

(toggle-debug-on-error)
(setq lsp-print-io t)
(setq dap-print-io t)

and then after retrying paste the content of *messages* buffer and the error callstack?

from dap-mode.

skybert avatar skybert commented on August 16, 2024

Sure:

lsp--stdio-wait: Content-Length: 139

{
  "jsonrpc": "2.0",
  "method": "workspace/executeCommand",
  "params": {
    "command": "vscode.java.resolveMainClass"
  },
  "id": 23
}
Output from language server: {
  "jsonrpc": "2.0",
  "method": "window/logMessage",
  "params": {
    "type": 3,
    "message": "11 Sep 2018, 16:08:46 >> workspace/executeCommand vscode.java.resolveMainClass"
  }
}
11 Sep 2018, 16:08:46 >> workspace/executeCommand vscode.java.resolveMainClass
Output from language server: {
  "jsonrpc": "2.0",
  "id": 23,
  "error": {
    "code": -32601,
    "message": "No delegateCommandHandler for vscode.java.resolveMainClass"
  }
}
Error from the Language Server: No delegateCommandHandler for vscode.java.resolveMainClass (Method not Found)
Entering debugger...
Debugger entered--Lisp error: (error "Unable to find main class.
Please check whether the server is configured propertly")
  signal(error ("Unable to find main class.\nPlease check whether the server is configured propertly"))
  error("Unable to find main class.\nPlease check whether the server is configured propertly")
  dap-java--select-main-class()
  dap-java--populate-launch-args((:type "java" :request "launch" :args "" :name "Run Configuration"))
  dap-java--populate-default-args((:type "java" :request "launch" :args "" :name "Run Configuration"))
  dap-debug((:type "java" :request "launch" :args "" :name "Run Configuration"))
  funcall-interactively(dap-debug (:type "java" :request "launch" :args "" :name "Run Configuration"))
  #<subr call-interactively>(dap-debug record nil)
  apply(#<subr call-interactively> dap-debug (record nil))
  call-interactively@ido-cr+-record-current-command(#<subr call-interactively> dap-debug record nil)
  apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (dap-debug record nil))
  call-interactively(dap-debug record nil)
  command-execute(dap-debug record)
  #[257 "\306�!\262�\307\300!\203�

from dap-mode.

yyoncho avatar yyoncho commented on August 16, 2024

Can you paste the content of the messages buffer as well?

I believe that the jdt server is not configured with the debug extension, I suspect that you are probably using stock jdt instead of jdt eclipse che one you can fix that by making sure that you are using latest LSP Java and calling lsp-java-update-server

Also, please delete the part in the config section, it is overriding the default java function with the demo one. I will update the readme to make that clear.

(use-package dap-java)

from dap-mode.

skybert avatar skybert commented on August 16, 2024

Ok, that got me a bit further: M-x lsp-java-update-server. It indeed solves the error described in my original issue description.

I will continue tomorrow, would be awesome to get a good Java debugger in Emacs again (haven't had that since jdibug and dap-java looks even better than jdibug was.

from dap-mode.

yyoncho avatar yyoncho commented on August 16, 2024

I will update the readme and I will change the code to raise an error if the server is not configured correctly, since lsp-mode is not doing that. Meanwhile update the dap-mode with today's version because l have reverted wrongly submitted cl. If you hit any issue feel free to ping me.

from dap-mode.

skybert avatar skybert commented on August 16, 2024

Thanks @yyoncho!

from dap-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.