lsp-dart icon indicating copy to clipboard operation
lsp-dart copied to clipboard

Hot Restart Button on Flutter Debug mode, does not work as expected.

Open samuelematias opened this issue 3 years ago • 4 comments

Describe the bug On Flutter Debug mode, the Hot Restart Button, does not work as expected.

Flutter Debug Helper Palette Screen Shot 2021-04-08 at 17 56 14

The Hot Restart Button Screen Shot 2021-04-08 at 17 56 18

When clicked, the application closes.

hot-restart-button-bug

Where it should actually perform the hot restart of the app, which would be the same as when using the lsp-dart-dap-flutter-hot-restart function.

hot-restart-button-need-do

To Reproduce M-x -> dap-debug -> Flutter :: Debug, with the app running and theFlutter Debug Helper Palette showing, click on the Hot Restart Button (the Green Button).

Expected behavior Hot Restart the app.

Actual behavior The app closes.

Version Screen Shot 2021-04-08 at 17 54 35

samuelematias avatar Apr 08 '21 21:04 samuelematias

Thanks for the report!

Actually that button is generic for dap-mode and that button means Restart the debug session 😅 @yyoncho maybe we could allow changing that or introduce some other entrypoint?

ericdallo avatar Apr 08 '21 21:04 ericdallo

Thanks for the report!

Actually that button is generic for dap-mode and that button means Restart the debug session 😅 @yyoncho maybe we could allow changing that or introduce some other entrypoint?

Just to clarify; this is the behaviour on vscode (the button does a hot restart not a full restart). Seems like there could be a dap-ui-restart-button-function or something to decide what to use to "restart" the session?

elken avatar May 19 '22 14:05 elken

yes, ATM the dap-ui-control is generic for all languages, and dart/flutter is the only one that we want this behavior, so we need to make dap-mode accept this custom behavior change c/c @yyoncho

ericdallo avatar May 19 '22 17:05 ericdallo

I think that restart implementation in dap-mode is incorrect and that it should somehow be generic and handle that case. But adding extension points is generally fine.

yyoncho avatar May 19 '22 18:05 yyoncho