svaante / dape

Debug Adapter Protocol for Emacs
GNU General Public License v3.0
448 stars 25 forks source link

Help regarding using dir-locals with delve #103

Closed RomanManz closed 3 months ago

RomanManz commented 3 months ago

Trying to provide :args and (optionally) :stopOnEntry to dlv using dir-locals but cannot make it work. Could you pls. provide an example? Thanks a lot for the help!

svaante commented 3 months ago

Hey! I could not get :stopOnEntry to work seams like dlv hangs when :stopOnEntry t.

I would recommend the following .dir-locals.el:

;;; Directory Local Variables            -*- no-byte-compile: t -*-
;;; For more information see (info "(emacs) Directory Variables")

((go-mode . ((dape-command . (dlv :args ["testing"])))))

dape-command is the default minibuffer value for the dape command (analogous to how compile-command works for compile)

RomanManz commented 3 months ago

Got it, :args work, thanks a lot :-) Now I understand why I couldn't find anything related inside the code, was not aware how dir-locals work.