Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
When running Flutter tests in Emacs with dart-lsp, I used the Code Lens feature to click on Test and Debug lens on top of my tests.
But for an application I was working on, I needed to pass the
--no-sound-null-safety
argument to the Flutter CLI when debugging my tests. To make the Test lens run, I needed to add the following configuration in my Emacs:(setq lsp-dart-test-extra-args '("--no-sound-null-safety"))
But it didn't work for the Debug lens, in the dart-lsp codebase, I can see that the
lsp-dart-test-extra-args
option sends the arguments to Dart'svmAdditionalArgs
, but looking in the dartcode.org websitehttps://dartcode.org/docs/launch-configuration
for debugging I needed to pass the argument totoolArgs
for it to work, and there is currently no way to do it.So this PR adds a variable (is variable the right way to call this? I'm an Emacs newbie 😅 ) called
lsp-dart-dap-tool-args
that can be used like this:(setq lsp-dart-dap-tool-args ["--no-sound-null-safety"])
With this turned on, the Debug lens work with the null safety argument being passed.
This is my first contribution, so I don't know how things work, do I need to bump the changelog too?