-
Notifications
You must be signed in to change notification settings - Fork 340
Description
Hello there,
It's been a while since I came by .. hope all is well!
Describe the bug
When running a test in debug mode, the cursor in the test file moves to the beginning of the file after each run.
This is inconvenient since after each time I run the test, I have to scroll back to the line wherever the test is to run it again.
To Reproduce
Steps to reproduce the behavior:
-
create a new dart project (i.e.
dart create debug_cursor_issue) -
go to the test file and paste the sample code there (given below).
-
scroll down to the test
-
place the cursor somewhere within the test
-
click on the
debugbutton shown above the test within the file.

-
click the
continuebutton in the debugger controller until the end. -
the cursor now should've moved to the top of the file.
>>>> Sample Code <<<<<<
import 'package:dart_code_test_bug/dart_code_test_bug.dart';
import 'package:test/test.dart';
/*
LONG COMMENT TO SIMULATE THE BUG
Jump to line 100
*/
void main() {
test('calculate', () {
try {
expect(true, false);
} on FormatException catch (e) {
//
}
});
}
Expected behavior
I expect the cursor to stay in its place -- it's inconvenient to keep scrolling back after each run especially in large test files.
Please complete the following information:
- Operating System and version: 12.6 (21G115)
- VS Code version: 1.81.1
- Dart extension version: v3.70.0
- Dart/Flutter SDK version: Dart SDK version: 3.1.0 (stable) (Tue Aug 15 21:33:36 2023 +0000) on "macos_x64"