Skip to content

Cannot copy variable value when it's bigger than a certain length #5778

@andre-ss6

Description

@andre-ss6

Describe the bug
When debugging, if I have a local variable of String type in the Variables window and its value is bigger than a certain length, the debugger will show it truncated with ellipsis and hitting Ctrl + C or right-clicking > Copy Value will only copy the shown value (truncated).

There's currently no alternative that I know of:

Using the debug console won't work for accessing private fields of other classes (and maybe would show the value truncated anway? Not sure)
Hovering over the variable in the editor also shows the value truncated;
There's no configuration option in launch.json for type:dart that I know of that controls this (apparently some other languages has an option for configuring this).

To Reproduce
Steps to reproduce the behavior:

  1. Create a String local with a big length (eg > 1500 characters)
  2. Start debugging (type: dart, request: launch)
  3. Use the Variables window to inspect your variable

Expected behavior
I can copy the full value

Screenshots

Image

Please complete the following information:

You can run the Dart: Collect Diagnostic Information command from the VS Code command palette (F1) to easily capture this information or provide it manually.

  • Operating System and version: Windows 11 Pro 25H2
  • VS Code version: win 1.105.1
  • Dart extension version: 3.122.0
  • Dart/Flutter SDK version: 3.8.0/3.32.0
  • Target device (if the issue relates to Flutter debugging): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsis bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions