VSCode HMR not working with Flutter while Debugging
See original GitHub issueHMR works with flutter run
& then pressing r
& even R
for Live Reloading but does not work with Debugger when pressed with fn+F5
on Mac
My simple code is -
lib/main.dart
import 'package:flutter/material.dart';
void main() => runApp(MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Hello, Universe!"),
),
body: Container(
decoration: BoxDecoration(
color: Colors.red,
),
child: Text("One"),
),
),
));
And I change One
to Two
to test HMR but it doesn’t work. The below is a log for running app & changing One
to Two
in the Text
widget.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
VSCode hot reload for Flutter does not work - Stack Overflow
To solve the issue first close the running debugging session using Shift+f5. Then click debug from the menu bar. Click Start without debugging....
Read more >Hot reload - Flutter documentation
Hot reload works by injecting updated source code files into the running Dart ... Only Flutter apps in debug mode can be hot...
Read more >Flutter Hot Reload Not Working in VS Code FIX ... - YouTube
IMPORTANT NOTE: "Hot Reload" only works for changes that are made INSIDE of the build() method, whereas "Hot Restart" are for changes ...
Read more >Error loading ASGI app. Could not import module "main"
I have been having issues debugging flutter app on IOS Simulator either by running flutter run or hit run without debuging on vs...
Read more >How to fix debugging Flutter in VS Code
It's really fascinating since it uses Material Design theme and it almost looks the same in iOS and Android. Problem. Now all these...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad to hear it’s all working (even though I am still slightly confused by the shortcuts and debug dropdown!). Do let me know if you hit any issues!
@MuhammamdArslanKhan if you’re having issues, please file a new issue. You can capture logs using the capture logs command - you can untick Analysis Server but leave everything else ticked.
Edit: I’ll respond over on https://github.com/Dart-Code/Dart-Code/issues/2786!