Skip to content

Commit

Permalink
tweak(dape): additional adapters for GO and JS
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 17, 2023
1 parent b7739ba commit 664c17b
Showing 1 changed file with 37 additions and 12 deletions.
49 changes: 37 additions & 12 deletions modules/me-debug.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,22 @@
:straight (:host github :repo "svaante/dape")
:init
(defvar +dape-cpptools-command
(concat minemacs-local-dir "dape/microsoft.vscode-cpptools/extension/bin/cpptools"))
(concat minemacs-local-dir "dape/cpptools/extension/bin/cpptools"))
(defvar +dape-js-debug-path
(concat minemacs-local-dir "dape/js-debug/extension/"))
(defvar +dape-codelldb-command
(concat minemacs-local-dir "dape/vadimcn.codelldb/extension/adapter/codelldb"))
(concat minemacs-local-dir "dape/codelldb/extension/adapter/codelldb"))
:custom
(dape-inline-variables t)
(dape-configs `((debugpy
(dape-configs `((debugpy ; https://github.com/microsoft/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)
(godot-launch
modes (gdscript-mode)
host "127.0.0.1"
port 6006
:type "server"
:request "launch")
(cpptools
(cpptools ; https://github.com/microsoft/vscode-cpptools
modes (c-mode c-ts-mode c++-mode c++-ts-mode)
command-cwd ,(file-name-directory +dape-cpptools-command)
command +dape-cpptools-command
Expand All @@ -42,7 +38,7 @@
:MIMode ,(cond
((executable-find "gdb") "gdb")
((executable-find "lldb") "lldb")))
(codelldb
(codelldb ; https://github.com/vadimcn/codelldb
modes (c-mode c-ts-mode c++-mode c++-ts-mode rust-mode rust-ts-mode)
command ,+dape-codelldb-command
host "localhost"
Expand All @@ -51,7 +47,36 @@
:type "lldb"
:request "launch"
:cwd dape-cwd-fn
:program dape-find-file))))
:program dape-find-file)
(delve ; https://github.com/go-delve/delve
modes (go-mode go-ts-mode)
command "dlv"
command-args ("dap" "--listen" "127.0.0.1:55878")
command-cwd dape-cwd-fn
host "127.0.0.1"
port 55878
:type "debug"
:request "launch"
:cwd dape-cwd-fn
:program dape-cwd-fn)
(js-debug ; https://github.com/microsoft/vscode-js-debug
modes (js-mode js-ts-mode)
host "localhost"
port 8123
command "node"
command-cwd ,+dape-js-debug-path
command-args ("src/dapDebugServer.js" "8123")
:type "pwa-node"
:request "launch"
:cwd dape-cwd-fn
:program dape-find-file-buffer-default
:outputCapture "console"
:sourceMapRenames t
:pauseForSourceMap nil
:enableContentValidation t
:autoAttachChildProcesses t
:console "internalConsole"
:killBehavior "forceful"))))

(use-package realgud
:straight (realgud :build (:not compile))
Expand Down

0 comments on commit 664c17b

Please sign in to comment.