rustic icon indicating copy to clipboard operation
rustic copied to clipboard

dap-mode integration

Open brotzeit opened this issue 6 years ago • 11 comments

https://github.com/emacs-lsp/dap-mode/issues/6#issuecomment-468795513

brotzeit avatar Jan 19 '20 10:01 brotzeit

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?

holyfight6 avatar Jun 12 '21 02:06 holyfight6

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.

brotzeit avatar Jun 12 '21 11:06 brotzeit

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 avatar Jun 12 '21 12:06 yyoncho

@yyoncho thanks I will try that.

holyfight6 avatar Jun 13 '21 10:06 holyfight6

@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 avatar Jun 14 '21 11:06 holyfight6

@holyfight6 do you have lldb installed?

yyoncho avatar Jun 14 '21 12:06 yyoncho

@yyoncho Yes, I have lldb installed. But it seems the default debugger without setting MIMode is gdb and I don't have gdb installed.

holyfight6 avatar Jun 14 '21 12:06 holyfight6

can you try if adding MIMode in lsp-rust-analyzer-debug will fix the issue?

yyoncho avatar Jun 14 '21 12:06 yyoncho

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.

holyfight6 avatar Jun 14 '21 12:06 holyfight6

Can you open lsp-mode issue? I will take a look what is needed to make it work with lldb

yyoncho avatar Jun 14 '21 13:06 yyoncho

@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.

holyfight6 avatar Jun 14 '21 13:06 holyfight6