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
{{ message }}
Repository navigation
Hot reload + other debugging functionality stopped working in VS Code 1.32 #1518
All of a sudden hot reloading isn't working anymore for Flutter apps. Main difference/cause is probably that I got a VS Code update just now/today - 1.32.0.
Could you possibly run the Dart: Capture Logs command and tick Flutter Run and Debugger (Observatory),, then launch a debug session and try hot reload a few times (both using the restart button on the debug toolbar, as well as the command in the command palette). Then click Stop Logging on the notification (which may have collapsed into the bell in the status bar) to get the logs.
@elricym Something fishy.
Started Debugging, then once up and running -> opened Dart DevTools but always get "Dart DevTools requires an active debug session.".
Reacted by Owen Donckers, John Cido, Phan, Clay, Sebastian, rasyeda, c0h1b4, Alexander Fallenstedt and micahnap
I just started the same issue, and when I tried what @elricym said, to run "Dart: Open DevTools", I got a popup saying that an active debug session doesn't exist. I'm wondering if the previous version would work, but Visual Studio Code is being stupid and won't let me downgrade back to it.
@DanTup
I'm experiencing hot reload issues too. And I just updated my VS Code this morning to 1.32.1.
In my case, after changed some properties passed to a widget constructor, manually trigger a hot reload does reflect the changes on the device. But after making changes to a dart file and save it, no automatically reload happens at all.
Here's the log I captured:
Dart Code extension: 2.24.0
Flutter extension: 2.24.0 (not activated)
VS Code: 1.32.1
Platform: mac
Workspace type: Flutter
Multi-root?: false
Dart SDK:
Loc: /SDK_DIRECTORY/bin/cache/dart-sdk
Ver: 2.2.0-edge.0a7dcf17eb5f2450480527d6ad1e201fb47f1e36
Flutter SDK:
Loc: /SDK_DIRECTORY
Ver: 1.2.1
HTTP_PROXY: undefined
NO_PROXY: undefined
Fri Mar 08 2019 [14:03:32 GMT+0800 (CST)] Log file started
[14:03:35 GMT+0800 (CST)] [General] [Info] Starting debug session...
[14:03:35 GMT+0800 (CST)] [General] [Info] workspace: /DEV_DIRECTORY
[14:03:35 GMT+0800 (CST)] [General] [Info] Using found common entry point: /DEV_DIRECTORY/sample/lib/main.dart
[14:03:35 GMT+0800 (CST)] [General] [Info] Using workspace as cwd: /DEV_DIRECTORY
[14:03:35 GMT+0800 (CST)] [General] [Info] Found better project root to use as cwd: /DEV_DIRECTORY/sample
[14:03:35 GMT+0800 (CST)] [General] [Info] Detected launch project as Flutter
[14:03:35 GMT+0800 (CST)] [General] [Info] Using Flutter debug adapter for this session
[14:03:35 GMT+0800 (CST)] [General] [Info] Checking for errors before launching
[14:03:35 GMT+0800 (CST)] [General] [Info] Debug session starting...
{
"program": "/DEV_DIRECTORY/sample/lib/main.dart",
"cwd": "/DEV_DIRECTORY/sample",
"name": "Dart & Flutter",
"type": "dart",
"request": "launch",
"args": [],
"vmAdditionalArgs": [],
"dartPath": "/SDK_DIRECTORY/bin/cache/dart-sdk/bin/dart",
"maxLogLineLength": 2000,
"pubPath": "/SDK_DIRECTORY/bin/cache/dart-sdk/bin/pub",
"pubSnapshotPath": "/SDK_DIRECTORY/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot",
"debugSdkLibraries": false,
"debugExternalLibraries": false,
"flutterDebuggerRestartBehaviour": "hotReload",
"evaluateGettersInDebugViews": true,
"forceFlutterVerboseMode": true,
"flutterTrackWidgetCreation": true,
"flutterMode": "debug",
"flutterPath": "/SDK_DIRECTORY/bin/flutter",
"deviceId": "-",
"deviceName": "-",
"showMemoryUsage": false,
"debugServer": 50876
}
Fri Mar 08 2019 [14:04:44 GMT+0800 (CST)] Log file ended
And I'm also seeing that dart devtools notification:
@thavlik Can you confirm exactly the behaviour you're seeing, and whether you're seeing "undefined session received in acceptDebugSessionStarted" in the developer console (Help -> Toggle Developer Tools).
@DanTup Am on 1.32.3 and can confirm that its not working for me either. Checked the dev console and there is no "undefined session received in acceptDebugSessionStarted"
I am going to switch back to 1.31.x.
@sutharsha Can you try reproducing the issue, and then when you hit it, run the "Open Dev Tools" command see whether it a) works or b) complains there is no debug session?
Could you also capture a log (using Dart: Capture Logs with Flutter Run and Observatory ticked)?
Also - before you edited your message, you said you say a reload message in the debug console - is that accurate? If so, it's probably not VS Code related but a Flutter issue (in which case, rolling VS Code back might not help). If that is the case, please also capture a log as above, but open a new issue with it instead, and I'll take a look.
Yeah, if you did see the reload message, then it's definitely not this issue, since the reload message comes from Flutter but the VS Code issue meant the hot reload was never really executed.
There is an open issue at flutter/flutter#29121 with some reports of hot reload not working correctly (it says it reloaded, but doesn't reflect changes), however some users were making changes in their main method so it's not entirely clear if there's a bug of people just hitting hot reloads limitations.
For all it's worth, starting/hot reloading/etc is still working as intended with VSC 1.33.1 and extension v3.0 on my end. The previous bug was widespread and would happen for everyone. So any potential new bug would be unrelated to this issue as reported.
Activity
elricym commentedon Mar 7, 2019
Same here. It seems that there is no active debug session within vscode. Try "Dart: Open DevTools".
DanTup commentedon Mar 7, 2019
Could you possibly run the Dart: Capture Logs command and tick Flutter Run and Debugger (Observatory),, then launch a debug session and try hot reload a few times (both using the restart button on the debug toolbar, as well as the command in the command palette). Then click Stop Logging on the notification (which may have collapsed into the bell in the status bar) to get the logs.
zarko-tg commentedon Mar 7, 2019
@elricym Something fishy.
Started Debugging, then once up and running -> opened Dart DevTools but always get "Dart DevTools requires an active debug session.".
zarko-tg commentedon Mar 7, 2019
@DanTup
elricym commentedon Mar 7, 2019
@DanTup
TBH, there is nothing captured after I started debug.
Flutter extension: 2.24.0 (not activated)is the weirdest thing here.odonckers commentedon Mar 7, 2019
I just started the same issue, and when I tried what @elricym said, to run "Dart: Open DevTools", I got a popup saying that an active debug session doesn't exist. I'm wondering if the previous version would work, but Visual Studio Code is being stupid and won't let me downgrade back to it.
odonckers commentedon Mar 7, 2019
@DanTup bellow is my logs. I hope you figure this out soon, it has become quite the annoyance.
priezz commentedon Mar 8, 2019
Hot reload works with the VSCode 1.31.0, so the issue should be related to some changes in vscode, not in the plugin itself.
JohnCido commentedon Mar 8, 2019
@DanTup
I'm experiencing hot reload issues too. And I just updated my VS Code this morning to 1.32.1.
In my case, after changed some properties passed to a widget constructor, manually trigger a hot reload does reflect the changes on the device. But after making changes to a dart file and save it, no automatically reload happens at all.
Here's the log I captured:
And I'm also seeing that dart devtools notification:

24 remaining items
brian-dunn commentedon Mar 15, 2019
VSC 1.32.3 was just released, and it breaks hot reload. So, it looks like we regressed again.
Sorry if this is a newbie question, but how to I manually downgrade to VSC 1.31?
oliverbytes commentedon Mar 16, 2019
Thanks a lot!! Works again with latest version.
thavlik commentedon Mar 20, 2019
Which version are you using? I was just on 1.32.3 and it's not working, but it is working with the Insider's build.
DanTup commentedon Mar 20, 2019
@thavlik Can you confirm exactly the behaviour you're seeing, and whether you're seeing "undefined session received in acceptDebugSessionStarted" in the developer console (Help -> Toggle Developer Tools).
sutharsha commentedon Mar 23, 2019
@DanTup Am on 1.32.3 and can confirm that its not working for me either. Checked the dev console and there is no "undefined session received in acceptDebugSessionStarted"
I am going to switch back to 1.31.x.
DanTup commentedon Mar 23, 2019
@sutharsha Can you try reproducing the issue, and then when you hit it, run the "Open Dev Tools" command see whether it a) works or b) complains there is no debug session?
Could you also capture a log (using Dart: Capture Logs with Flutter Run and Observatory ticked)?
Also - before you edited your message, you said you say a reload message in the debug console - is that accurate? If so, it's probably not VS Code related but a Flutter issue (in which case, rolling VS Code back might not help). If that is the case, please also capture a log as above, but open a new issue with it instead, and I'll take a look.
sutharsha commentedon Mar 23, 2019
@DanTup I had uninstalled and went back to 1.31.1. Updated it back to current 1.32.3. Now unable to reproduce the issue. Hot reload works for now :/.
And yes i did get the reload message then.
Sure, If i get it again ll open an issue in flutter.
DanTup commentedon Mar 24, 2019
Yeah, if you did see the reload message, then it's definitely not this issue, since the reload message comes from Flutter but the VS Code issue meant the hot reload was never really executed.
There is an open issue at flutter/flutter#29121 with some reports of hot reload not working correctly (it says it reloaded, but doesn't reflect changes), however some users were making changes in their main method so it's not entirely clear if there's a bug of people just hitting hot reloads limitations.
DanTup commentedon May 8, 2019
1.33.1 has been out a while, though I did publish a new extension (v3.0) yesterday.
@atilkan can you open a new issue with a description of exactly what you see, including a log started prior to launching the app.
Thanks!
zeh commentedon May 8, 2019
For all it's worth, starting/hot reloading/etc is still working as intended with VSC 1.33.1 and extension v3.0 on my end. The previous bug was widespread and would happen for everyone. So any potential new bug would be unrelated to this issue as reported.