Skip to content

Commit 6bb26fe

Browse files
committed
Fix lsp-dart-run for dart only files.
Fixes #168
1 parent 60de283 commit 6bb26fe

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
* Fix some emulators not starting for new sdk debugger. #167
66
* Fix duplicated logs on old debugger. #154
7+
* Fix `lsp-dart-run` for dart only files. #168
8+
* Fix test tree when debugging dart/flutter tests.
79

810
## 1.22.0
911

lsp-dart-dap.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ Required to support 'Inspect Widget'."
194194
lsp-dart-dap--base-debugger-args
195195
(dap--put-if-absent :type "dart")
196196
(dap--put-if-absent :name "Dart")
197+
(dap--put-if-absent :dap-server-path (if (lsp-dart-dap-use-sdk-debugger-p)
198+
`(,(lsp-dart-dart-command) "debug_adapter")
199+
lsp-dart-dap-dart-debugger-program))
197200
(dap--put-if-absent :program (or (lsp-dart-get-project-entrypoint)
198201
(buffer-file-name)))))
199202

@@ -344,6 +347,11 @@ Call CALLBACK when the device is chosen and started successfully."
344347
(unless launched
345348
(browse-url url))))
346349

350+
(declare-function lsp-dart-test--handle-notification "lsp-dart-test-support")
351+
(cl-defmethod dap-handle-event ((_event (eql dart.testNotification)) _session params)
352+
"Handle dart test notifications where PARAMS is the test notification."
353+
(lsp-dart-test--handle-notification (intern (lsp-get params :type)) params))
354+
347355
(cl-defmethod dap-handle-event ((_event (eql dart.hotRestartRequest)) _session _params)
348356
"Ignore this event.")
349357
(cl-defmethod dap-handle-event ((_event (eql dart.hotReloadRequest)) _session _params)

0 commit comments

Comments
 (0)