Open brotzeit opened 4 years ago
Hi @brotzeit , is there any progress of this enhancement? I'm very new to emacs lisp, so I doubt that I could do this myself. Is there any way I could help with this? BTW, is there any code style guide of this project?
is there any progress of this enhancement?
Unfortunately no(at least not for rustic).
Is there any way I could help with this?
I actually haven't spent time on investigating. @yyoncho mentioned the idea some time ago https://github.com/emacs-lsp/dap-mode/issues/6#issuecomment-468795513. Maybe somebody already did some work on it ? I haven't been using dap-mode for a long time.
BTW, is there any code style guide of this project?
Not really. Just the general elisp best practices.
lsp-mode should be now sufficient after installing cpptools adapter. Then M-x lsp-rust-analyzer-debug
or clicking on the debug lens should do.
@yyoncho thanks I will try that.
@yyoncho Hi, when I tried to use M-x lsp-rust-analyzer-debug
or the debug lens, I encountered this error:
Warning (emacs): Initialize request failed: Unable to start debugging. Launch options string provided by the project system is invalid. Unable to determine path to debugger. Please specify the "MIDebuggerPath" option.
But I didn't find any way to set this argument. I didn't find any code in lsp-rust-analyzer-debug
set MIMode
or MIDebuggerPath
either.
@holyfight6 do you have lldb installed?
@yyoncho Yes, I have lldb installed. But it seems the default debugger without setting MIMode
is gdb and I don't have gdb installed.
can you try if adding MIMode in lsp-rust-analyzer-debug
will fix the issue?
I've tried this:
(list :type "cppdbg" :request "launch" :name label :args executable-args :cwd workspace-root? :sourceLanguages ["rust"] :MIMode "lldb" :MIDebuggerPath "/usr/bin/lldb" :program)
But get this error:
error: unknown option: --interpreter=mi error: unknown option: --tty=/dev/pts/0 Use 'lldb --help' for a complete list of options.
Edit: Without the MIDebuggerPath
set, it will still complain Launch options string provided by the project system is invalid. Unable to determine path to debugger. Please specify the "MIDebuggerPath" option
.
Can you open lsp-mode issue? I will take a look what is needed to make it work with lldb
@yyoncho It's done. The issue is emacs-lsp/lsp-mode#2928. If you don't have much time, I can try to implement something similar to the rust-analyzer vscode extension, but I'm new to emacs lisp so it may take some time.
https://github.com/emacs-lsp/dap-mode/issues/6#issuecomment-468795513