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
Add to watch and evaluate in debug console, doesn't work with multiline selection #2391
When I evaluate in the debug console, it seems to work ok:
For the watch window, the label only shows the first line, but if I double-click in it, it does expand and has the full amount (and the value shown when expanding it is also correct for all of the lines).
Are you able to reduce your code to a standalone script that still repros that I can run here? Thanks!
I can reproduce again. The logs are attaached, I did evaluate two expression in the debug console. One with test.stream and one with:
test.stream
.skipWhile((int i) => i <2)
The interesting thing was, that I was only able to reproduce in a flutter project or a library that had flutter in it's pubspec.yaml. Did you tried your code in a pure dart library? So if you try to reproduce, try a flutter project.
Create a new Flutter project and add this to the main:
import'dart:async';
import'package:flutter/material.dart';
voidmain() {
StreamController<int> test =StreamController<int>();
test.add(1);
test.add(2);
test.add(3);
test.add(4);
var test2 = test.stream
.skipWhile((int i) => i <2)
.skipWhile((int i) => i >3)
.map((int i) => i +1);
runApp(MyApp());
}
@HerrNiklasRaab Thanks! You were right, I only tested with Dart. Can easily repro in Flutter by just pasting a multiline expression into the debug console.
I believe this is a Flutter issue - expression evaluation is a little different for Flutter, as the expression has to be compiled and sent over to the device for evaluation - I suspect the issue is in the Flutter code that handles this.
I've opened flutter/flutter#55731 about this, and also dart-lang/sdk#41671 because I noticed trailing semicolons cause issues too. You can subscribe to them for updates.
Closing this as it seems entirely a Flutter issue and once fixed in flutter/flutter#55731 it'll work here in VS Code without any further changes. Subscribe there for updates - thanks!
Activity
DanTup commentedon Apr 23, 2020
When I evaluate in the debug console, it seems to work ok:
For the watch window, the label only shows the first line, but if I double-click in it, it does expand and has the full amount (and the value shown when expanding it is also correct for all of the lines).
Are you able to reduce your code to a standalone script that still repros that I can run here? Thanks!
HerrNiklasRaab commentedon Apr 24, 2020
I reinstalled macOS, now it works again. Don't know what caused this.
DanTup commentedon Apr 24, 2020
Weird - if you see it again and can capture a log, let me know!
HerrNiklasRaab commentedon Apr 24, 2020
Hey @DanTup,
I can reproduce again. The logs are attaached, I did evaluate two expression in the debug console. One with
test.streamand one with:test.stream .skipWhile((int i) => i < 2)The interesting thing was, that I was only able to reproduce in a flutter project or a library that had flutter in it's pubspec.yaml. Did you tried your code in a pure dart library? So if you try to reproduce, try a flutter project.
Create a new Flutter project and add this to the main:
These are the logs:
Dart-Code-Log-2020-03-06 00-17-46.txt.zip
DanTup commentedon Apr 27, 2020
@HerrNiklasRaab Thanks! You were right, I only tested with Dart. Can easily repro in Flutter by just pasting a multiline expression into the debug console.
I believe this is a Flutter issue - expression evaluation is a little different for Flutter, as the expression has to be compiled and sent over to the device for evaluation - I suspect the issue is in the Flutter code that handles this.
I've opened flutter/flutter#55731 about this, and also dart-lang/sdk#41671 because I noticed trailing semicolons cause issues too. You can subscribe to them for updates.
Thanks!
DanTup commentedon May 4, 2020
Closing this as it seems entirely a Flutter issue and once fixed in flutter/flutter#55731 it'll work here in VS Code without any further changes. Subscribe there for updates - thanks!
DanTup commentedon Aug 11, 2026
This was fixed in flutter/flutter#190722 and will be included in a future Flutter SDK.