Add dape for debugging
This commit is contained in:
parent
7aea6199cd
commit
68955452a5
@ -240,6 +240,33 @@
|
|||||||
(eglot-confirm-server-initiated-edits nil)
|
(eglot-confirm-server-initiated-edits nil)
|
||||||
(eglot-connect-timeout nil))
|
(eglot-connect-timeout nil))
|
||||||
|
|
||||||
|
;; Debug adapter protocol
|
||||||
|
(use-package dape
|
||||||
|
:config
|
||||||
|
(add-to-list 'dape-configs
|
||||||
|
'(rdbg
|
||||||
|
modes (ruby-mode ruby-ts-mode)
|
||||||
|
ensure dape-ensure-command
|
||||||
|
command "bundle"
|
||||||
|
command-args ("exec" "rdbg" "-O" "--host" "0.0.0.0" "--port" :autoport "-c" "--" :-c)
|
||||||
|
fn (lambda (config)
|
||||||
|
(plist-put config 'command-args
|
||||||
|
(mapcar (lambda (arg)
|
||||||
|
(if (eq arg :-c)
|
||||||
|
(plist-get config '-c)
|
||||||
|
arg))
|
||||||
|
(plist-get config 'command-args))))
|
||||||
|
port :autoport
|
||||||
|
command-cwd dape-command-cwd
|
||||||
|
:type "Ruby"
|
||||||
|
;; -- examples:
|
||||||
|
;; rails server
|
||||||
|
;; bundle exec ruby foo.rb
|
||||||
|
;; bundle exec rake test
|
||||||
|
-c (lambda ()
|
||||||
|
(format "ruby %s"
|
||||||
|
(or (dape-buffer-default) ""))))))
|
||||||
|
|
||||||
;; Some compilation-mode conveniences
|
;; Some compilation-mode conveniences
|
||||||
(use-package compile
|
(use-package compile
|
||||||
:straight (:type built-in)
|
:straight (:type built-in)
|
||||||
|
Loading…
Reference in New Issue
Block a user