since a week I try to setup the debugger for emacs (MacOS Arm) and as I do not have so much experiences with lisp I do not know what I am doing wrong.
I have try to follow the following ressources without success:
- Configuring Emacs for Rust development | Robert Krahn
- Debugging Rust in Emacs with dap-mode
- Configuration - DAP Mode
My current configuration (config.el):
(require 'dap-gdb-lldb) (setq dap-auto-configure-features '(sessions locals controls tooltip))
Path to lldb
which lldb /opt/homebrew/opt/llvm/bin/lldb
Path to lldb-mi:
which lldb-mi /usr/local/bin/lldb-mi
Path to rust-lldb:
which rust-lldb /Users/pascal/.cargo/bin/rust-lldb
Path to rust-analyser:
which rust-analyzer /opt/homebrew/bin/rust-analyzer
I can start the debugger with the standard configuration and go line by line(1) but I am not able to see the values of the variables.
(1) some times this does not work and some time I jump from line 2 to 4 for example.
I have tried to put this configuration in the config.el but when I start the the debugger with dap-debug emacs show me the following message:
dap-debug: Have you loaded the ‘lldb’ specific dap package?
(use-package exec-path-from-shell :ensure :init (exec-path-from-shell-initialize)) (when (executable-find "lldb-mi") (use-package dap-mode :ensure :config (dap-ui-mode) (dap-ui-controls-mode 1) (require 'dap-lldb) (require 'dap-gdb-lldb) ;; installs .extension/vscode (dap-gdb-lldb-setup) (dap-register-debug-template "Rust::LLDB Run Configuration" (list :type "lldb" :request "launch" :name "LLDB::Run" :gdbpath "rust-lldb" ;; uncomment if lldb-mi is not in PATH ;; :lldbmipath "path/to/lldb-mi" ))))
Thank you for your support!