You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In Flutter project, dap-debug will ask the debug configuration template, and then ask the device to debug/run.
But it does not launch the selected device.
It launches the first device regardless of device selection.
So I checked the source.
In VSCode, toolArgs is set with device-id as followed:
But toolArgs is not absent here.
It's set in lsp-dart-dap--base-debugger-args with the value of defcustom lsp-dart-dap-tool-args.
And the default value of lsp-dart-dap-tool-args is [] as followed:
(defcustom lsp-dart-dap-tool-args []
"Additional args for the dart or flutter tool"
:group 'lsp-dart
:type '(repeat string))
So toolArgs will be always the value of lsp-dart-dap-toolArgs in lsp-dart-dap--populate-flutter-start-file-args.
I suppose that toolArgs should be added to the previous values instead of setting a new value if absent, because someone wants to set lsp-dart-dap-tool-args with certain values and device-id by user selection should be added to the values.
Workaround
I set lsp-dart-dap-tool-args to nil.
Then, dap-debug launches the selected device as followed:
Note
I checked that the issue is reproducible with latest melpa packages.
To Reproduce
Start dap-debug of Flutter project
Select debug configuration template. In my case, it is ("Flutter :: Debug" :type "flutter" :name "Flutter :: Debug").
Select any device which is not the first device.
The first device launches regardsless of device selection.
Expected behavior
dap-debug should launch the selected device.
Version
[LSP Dart] 1.24.3 at 2024.06.01 @ Emacs 29.3
[Dart SDK] Dart SDK version: 3.4.1 (stable) (Tue May 21 15:46:25 2024 +0000) on "macos_x64"
The text was updated successfully, but these errors were encountered:
odi-so
changed the title
toolArgs is not set in lsp-dart-dap--populate-flutter-start-file-args
dap-debug does not launch the selected device
Jun 1, 2024
odi-so
changed the title
dap-debug does not launch the selected device
dap-debug does not launch the selected device in Flutter project
Jun 1, 2024
Describe the bug
In Flutter project, dap-debug will ask the debug configuration template, and then ask the device to debug/run.
But it does not launch the selected device.
It launches the first device regardless of device selection.
So I checked the source.
In VSCode, toolArgs is set with device-id as followed:
But lsp-dart-dap sends empty toolArgs as followed:
In lsp-dart-dap--populate-flutter-start-file-args, toolArgs will be set with device-id if toolArgs is absent as followed:
But toolArgs is not absent here.
It's set in lsp-dart-dap--base-debugger-args with the value of defcustom lsp-dart-dap-tool-args.
And the default value of lsp-dart-dap-tool-args is [] as followed:
So toolArgs will be always the value of lsp-dart-dap-toolArgs in lsp-dart-dap--populate-flutter-start-file-args.
I suppose that toolArgs should be added to the previous values instead of setting a new value if absent, because someone wants to set lsp-dart-dap-tool-args with certain values and device-id by user selection should be added to the values.
Workaround
I set lsp-dart-dap-tool-args to nil.
Then, dap-debug launches the selected device as followed:
Note
I checked that the issue is reproducible with latest melpa packages.
To Reproduce
Expected behavior
dap-debug should launch the selected device.
Version
[LSP Dart] 1.24.3 at 2024.06.01 @ Emacs 29.3
[Dart SDK] Dart SDK version: 3.4.1 (stable) (Tue May 21 15:46:25 2024 +0000) on "macos_x64"
The text was updated successfully, but these errors were encountered: