Skip to content

debugging session unusable if local variable is too large #4205

@woprandi

Description

@woprandi

Describe the bug
When trying to debug app, if a local variable representing a very long list (list of 100M file bytes), the debugging session is not usable and often crash

To Reproduce
Steps to reproduce the behavior:

  1. Create a local big file (on Linux : dd if=/dev/zero of=my_big_file bs=100M count=1)
  2. Create a small dart app to read this file :
import 'dart:io';

void main() async {
  final bytes = await File('my_big_file').readAsBytes();
  final myVar = "foo";
  final myVar2 = "bar";
  final myVar3 =  "";
}
  1. Add breakpoint on line 5 or 6
  2. Run app in debug mode

On left side, it's not possible to see local variables (infinite loading) or go to next line. The session will crash few seconds later.

Connecting to VM Service at http://127.0.0.1:37661/g8bL_J7yzYI=/
Exited (sigint)

Due to its size, the bytes variable prevent debug next lines.

Expected behavior

Have a usable debugging session

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • Operating System and version: Fedora 36
  • VS Code version: 1.71.2
  • Dart extension version: v3.50.0
  • Dart/Flutter SDK version: Flutter 3.3.3 / Dart 2.18.2
  • Target device (if the issue relates to Flutter debugging):

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions