-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
in flutterRelates to running Flutter appsRelates to running Flutter appsin testingRelates to test execution of Dart/Flutter tests for end usersRelates to test execution of Dart/Flutter tests for end usersis enhancement
Milestone
Description
Describe the bug
TL;DR I can't evaluate code in Debug Console when running integration tests. I don't know if I'm doing something wrong or if this is just not possible.
Also, I can't find a way to run (using VS Code's launch.json) normal widget tests with flutter run test/widget_test.dart (=running on device) instead of flutter test test/widget_test.dart (running in isolation). This might be another issue, though.
To Reproduce
TL;DR Run any Flutter integration test with VS Code and try to evaluate Dart code in the Debug Console.
Create .vscode/launch.json in the root of a Flutter project with the following contents:
{
"version": "0.2.0",
"configurations": [
{
"name": "flutter run app",
"request": "launch",
"type": "dart",
"program": "lib/main.dart"
},
{
"name": "flutter run integration tests",
"request": "launch",
"type": "dart",
"program": "integration_test/example_test.dart"
},
]
}- Clone the repository of the Patrol framework
- Open the example app directory with VS Code (
$ code .). It's located inpackages/patrol/example - Now that you're in the example app's dir, put a breakpoint somewhere in the integration_test/example_test.dart file, for example on line 16:
await $(FloatingActionButton).tap();
- Run the
flutter run integration testsconfiguration fromlaunch.json - Try to evaluate some code in the Debug Console.
- See
_compileExpression: No compilation service available; cannot evaluate from source..
Expected behavior
Being able to evaluate Dart code in Debug Console when the test is stopped on a breakpoint.
This is how it works with widget tests running in isolation:
Running.widget.test.in.isolation.mov
System info
- Operating System and version: macOS 12.6 on MacBook Air M1
- VS Code version: 1.72.0
- Dart extension version: v3.50.0
- Dart/Flutter SDK version: Dart 2.18.2, Flutter 3.3.3
- Target device: Android emulator (Pixel 5 API 33)
Metadata
Metadata
Assignees
Labels
in flutterRelates to running Flutter appsRelates to running Flutter appsin testingRelates to test execution of Dart/Flutter tests for end usersRelates to test execution of Dart/Flutter tests for end usersis enhancement
