lsp-dart
lsp-dart copied to clipboard
JSON parse error when running dap-debug
Describe the bug
I'm unable to start a debug session with dap-mode, after running M-x dap-debug I get the following message.
error in process filter: End of file while parsing JSON: "premature end of input", "<string>", 1, 1024, 1024 [2 times]
To Reproduce
M-x dap-debug
Version
[LSP Dart] 1.17.11 (package: 20201206.1725) at 2021.01.08 @ Emacs 28.0.50
[Dart SDK] Dart SDK version: 2.10.4 (stable) (Wed Nov 11 13:35:58 2020 +0100) on "macos_x64"
@siraben did you run dap-dart-setup before?
@ericdallo yes.
It was working before but has stopped working, not sure why.
Ok, maybe some flutter/dart update broke that, could you toggle-debug-on-error and reproduce the issue again, then paste the stacktrace here?
Weird, I ran M-x toggle-debug-on-error then M-x dap-debug, but no stacktrace was produced.
Probably because is not a elisp raw error, it's from parsing the json on dap buffer, @yyoncho do you know how to debug that?
Might be similar to https://github.com/emacs-lsp/lsp-mode/issues/2375 What you can do is to wrap the debugger and see what exactly it is receiving.
Might be similar to https://github.com/emacs-lsp/lsp-mode/issues/2375 What you can do is to wrap the debugger and see what exactly it is receiving.
How would I wrap the debugger?
Did you ever get anywhere with this @siraben? I'm seeing the same error and am also not clear on how to wrap the debugger as @yyoncho suggests.
@zheylmun I have not programmed in Dart for a while so haven't tested the issue.
Could you both test with latest lsp-dart released this week and confirm this is still happening?
Might be similar to what I reported here - https://github.com/emacs-lsp/lsp-dart/issues/163#issuecomment-1169519435
This should be fixed after https://github.com/emacs-lsp/lsp-dart/pull/165