Skip to content

Commit f1b7366

Browse files
committed
pass -d device-id when debugging with sdk debugger
1 parent ca7b8b9 commit f1b7366

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lsp-dart-dap.el

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ 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))
200197
(dap--put-if-absent :program (or (lsp-dart-get-project-entrypoint)
201198
(buffer-file-name)))))
202199

@@ -247,9 +244,6 @@ Call CALLBACK when the device is chosen and started successfully."
247244
lsp-dart-dap--base-debugger-args
248245
(dap--put-if-absent :type "flutter")
249246
(dap--put-if-absent :flutterMode "debug")
250-
(dap--put-if-absent :dap-server-path (if (lsp-dart-dap-use-sdk-debugger-p)
251-
`(,(lsp-dart-flutter-command) "debug_adapter")
252-
lsp-dart-dap-flutter-debugger-program))
253247
(dap--put-if-absent :program (or (lsp-dart-get-project-entrypoint)
254248
(buffer-file-name))))))
255249
(lambda (start-debugging-callback)
@@ -259,6 +253,9 @@ Call CALLBACK when the device is chosen and started successfully."
259253
(-> pre-conf
260254
(dap--put-if-absent :deviceId device-id)
261255
(dap--put-if-absent :deviceName device-name)
256+
(dap--put-if-absent :dap-server-path (if (lsp-dart-dap-use-sdk-debugger-p)
257+
`(,(lsp-dart-flutter-command) "debug_adapter" "-d" ,device-id)
258+
lsp-dart-dap-flutter-debugger-program))
262259
(dap--put-if-absent :flutterPlatform "default")
263260
(dap--put-if-absent :name (concat "Flutter (" device-name ")")))))))))
264261

0 commit comments

Comments
 (0)