Skip to content

Commit 49af1b8

Browse files
authored
Merge pull request #444 from nbfalcon/bugfix/go-map-debugging
`dap-go': bump vscode-go version (fixes map debugging) With an update vscode-go version (C-u M-x dap-go-setup), dap is now able to inspect maps. Existing vscode-go installations will continue to work, issuing a warning after loading `dap-go`.
2 parents 59d3afd + 72d182b commit 49af1b8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

dap-go.el

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@
3535
:group 'dap-go
3636
:type 'string)
3737

38-
(defcustom dap-go-debug-program `("node"
39-
,(f-join dap-go-debug-path "extension/out/src/debugAdapter/goDebug.js"))
38+
(defcustom dap-go-debug-program
39+
`("node"
40+
,(let ((old (f-join dap-go-debug-path "extension/out/src/debugAdapter/goDebug.js"))
41+
(new (f-join dap-go-debug-path "extension/dist/debugAdapter.js")))
42+
(if (f-exists? old)
43+
(progn
44+
(lsp--warn "Go debug adapter is outdated; some features will not work properly (map debugging).\n\
45+
Update `dap-go' using `C-u M-x dap-go-setup'")
46+
old)
47+
new)))
4048
"The path to the go debugger."
4149
:group 'dap-go
4250
:type '(repeat string))
@@ -47,7 +55,7 @@
4755
:group 'dap-go
4856
:type 'string)
4957

50-
(dap-utils-vscode-setup-function "dap-go" "golang" "go" dap-go-debug-path "0.15.0")
58+
(dap-utils-vscode-setup-function "dap-go" "golang" "go" dap-go-debug-path "0.22.1")
5159

5260
(defun dap-go--populate-default-args (conf)
5361
"Populate CONF with the default arguments."

0 commit comments

Comments
 (0)