Handle debugger restart request (with a cold restart) for Flutter profile/release mode #4281
Labels
in debugger
Relates to the debug adapter or process of launching a debug session
in flutter
Relates to running Flutter apps
is enhancement
relies on sdk changes
Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone
See #4276 (comment).
We can't hide the "restart" button (which we usually use for Hot Restart) because VS Code doesn't allow it (restart should always be possible, even if it's not a Hot Restart, because it should just be the same as stopping the session and starting it again). We also can't currently tell VS Code to handle the restart because we only know about profile/release flags in launchRequest (not during startup when capabilities are exchanged).
So there are a few options:
flutter run
process, clean up all state, and then restart it (this is probably the best solution, but also complex)flutter debug_adapter
process so it's known beforelaunchRequest
, and use that to set thesupportsRestartRequest
capability.1 is ofc easiest, but I think we should probably do 2.
(on a related note, we should ensure Hot Restart commands are disabled/hidden from the palette etc., since we're just implementing a standard restart here, and having Hot Restart commands show up may be confusing where it's not supporting and we will do a cold restart).
The text was updated successfully, but these errors were encountered: