branch: externals/dape
commit 3a05121b02cd005fe8d94068bc35a2cdffb72419
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Fix adapter examples
---
README.org | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/README.org b/README.org
index 82dd598608..cb613968c9 100644
--- a/README.org
+++ b/README.org
@@ -1,5 +1,6 @@
#+title: Dape - Debug Adapter Protocol for Emacs
#+author: Daniel Pettersson
+#+property: header-args :results silent
#+language: en
This package integrates debug adapters within Emacs.
@@ -73,7 +74,8 @@ To install ~vscode-js-debug~ pull down the
[[https://github.com/microsoft/vscode
Example launch configuration for ~node~.
#+begin_src emacs-lisp
- (add-to-list `(vscode-js-node
+ (add-to-list 'dape-configs
+ `(vscode-js-node
modes (js-mode js-ts-mode)
host "localhost"
port 8123
@@ -90,8 +92,7 @@ Example launch configuration for ~node~.
:enableContentValidation t
:autoAttachChildProcesses t
:console "internalConsole"
- :killBehavior "forceful")
- dape-configs)
+ :killBehavior "forceful"))
#+end_src
For more information see
[[https://github.com/microsoft/vscode-js-debug/blob/main/OPTIONS.md][OPTIONS.md]].
@@ -100,7 +101,8 @@ For more information see
[[https://github.com/microsoft/vscode-js-debug/blob/mai
See
[[https://github.com/go-delve/delve/tree/master/Documentation/installation][delve
installation]].
#+begin_src emacs-lisp
- (add-to-list `(delve
+ (add-to-list 'dape-configs
+ `(delve
modes (go-mode go-ts-mode)
command "dlv"
command-args ("dap" "--listen" "127.0.0.1:55878")
@@ -110,8 +112,7 @@ See
[[https://github.com/go-delve/delve/tree/master/Documentation/installation][
:type "debug"
:request "launch"
:cwd dape-cwd-fn
- :program dape-cwd-fn)
- dape-configs)
+ :program dape-cwd-fn))
#+end_src
For more information see
[[https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_dap.md][documentation]].
@@ -120,7 +121,8 @@ For more information see
[[https://github.com/go-delve/delve/blob/master/Documen
Download latest [[https://github.com/vadimcn/codelldb/releases][release]] and
unpack ~vsix~ file with your favorite unzipper.
#+begin_src emacs-lisp
- (add-to-list `(codelldb
+ (add-to-list 'dape-configs
+ '(codelldb
modes (c-mode c-ts-mode
c++-mode c++-ts-mode
rust-ts-mode rust-mode)
@@ -132,8 +134,7 @@ Download latest
[[https://github.com/vadimcn/codelldb/releases][release]] and un
:type "lldb"
:request "launch"
:cwd dape-cwd-fn
- :program dape-find-file)
- dape-configs)
+ :program dape-find-file))
#+end_src
See [[https://github.com/vadimcn/codelldb/blob/v1.10.0/MANUAL.md][manual]] for
more information.
@@ -145,7 +146,8 @@ Then ~chmod +x debugAdapters/bin/OpenDebugAD7~.
#+begin_src emacs-lisp
;; Replace ms-vscode.cpptools with the vsix directory you just extracted
(setq dape-cppdbg-command
"ms-vscode.cpptools/debugAdapters/bin/OpenDebugAD7")
- (add-to-list `(cppdbg
+ (add-to-list 'dape-configs
+ `(cppdbg
modes (c-mode c-ts-mode c++-mode c++-ts-mode)
command-cwd ,(file-name-directory
dape--cppdbg-command)
@@ -156,8 +158,7 @@ Then ~chmod +x debugAdapters/bin/OpenDebugAD7~.
:program dape-find-file
:MIMode ,(cond
((executable-find "gdb") "gdb")
- ((executable-find "lldb") "lldb")))
- dape-configs)
+ ((executable-find "lldb") "lldb"))))
#+end_src
See [[https://code.visualstudio.com/docs/cpp/launch-json-reference][options]].
@@ -166,15 +167,15 @@ See
[[https://code.visualstudio.com/docs/cpp/launch-json-reference][options]].
Install debugpy with pip ~pip install debugpy~
#+begin_src emacs-lisp
- (add-to-list `(debugpy
+ (add-to-list 'dape-configs
+ `(debugpy
modes (python-ts-mode python-mode)
command "python3"
command-args ("-m" "debugpy.adapter")
:type "executable"
:request "launch"
:cwd dape-cwd-fn
- :program dape-find-file-buffer-default)
- dape-configs)
+ :program dape-find-file-buffer-default))
#+end_src
See
[[https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings][options]].
@@ -194,4 +195,5 @@ See
[[https://microsoft.github.io/debug-adapter-protocol/implementors/adapters/]
+ Variable values displayed in source buffer, this seams to require
integration with lsp-mode and eglot
* Bugs and issues
-Before reporting any issues take a look at ~*dape-debug*~ buffer with all
debug messages enabled ~(setq dape--debug-on '(io info error std-server)~.
+Before reporting any issues take a look at ~*dape-debug*~ buffer with all
debug messages enabled.
+~(setq dape--debug-on '(io info error std-server)~.