Skip to content

Commit 72b6327

Browse files
committed
Supports web debug on google chrome via dap-mode.
1 parent 5cbdfc9 commit 72b6327

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 1.19.0
44

5+
* Supports web debug on google chrome via dap-mode.
56
* Deprecate `dap-dart-setup`, use `lsp-dart-dap-setup` now.
67
* Improve debugger setup downloading directly from Dart-Code repo.
78
* Bump debugger from 3.19.2 to 3.23.0.

lsp-dart-dap.el

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,19 @@ Call CALLBACK when the device is chosen and started successfully."
294294
"Handle debugger uris EVENT for SESSION with PARAMS."
295295
(lsp-dart-dap-log "App ready!"))
296296

297+
(cl-defmethod dap-handle-event ((_event (eql dart.exposeUrl)) session params)
298+
"Respond SESSION with the url from given PARAMS."
299+
(-let (((&hash "url") params))
300+
(dap-request session "exposeUrlResponse"
301+
:originalUrl url
302+
:exposedUrl url)))
303+
304+
(cl-defmethod dap-handle-event ((_event (eql dart.webLaunchUrl)) session params)
305+
"Open url in browser from SESSION and PARAMS."
306+
(-let (((&hash "launched" "url") params))
307+
(unless launched
308+
(browse-url url))))
309+
297310
(cl-defmethod dap-handle-event ((_event (eql dart.hotRestartRequest)) _session _params)
298311
"Ignore this event.")
299312
(cl-defmethod dap-handle-event ((_event (eql dart.hotReloadRequest)) _session _params)

0 commit comments

Comments
 (0)