Skip to content

"Source not available" on assertion failures in Flutter when debugging SDK code #4759

@pattobrien

Description

@pattobrien

Undebuggable Stack Frame Popup Bug

see reproducible example here: https://github.com/pattobrien/undebuggable_stack_frame#undebuggable-stack-frame-popup-bug

Steps to Reproduce

  1. Create a Dart package with Flutter SDK as a dependency.
  2. Set Dart Code debug option to 'debug my code + packages + SDK'.
  3. Run a test that fails an assertion.

Expected Behavior

The assertion stack frame should appear in the source view.

Actual Behavior

The assertion appears as a file in a new VSCode tab titled errors_patch.dart with the following content:

Could not load source 'dart:core-patch/errors_patch.dart': <source not available>.

Screenshots

Screenshot 2023-09-25 at 4 32 45 PM

Flutter 3.10.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f468f3366c (3 months ago) • 2023-07-12 15:19:05 -0700
Engine • revision cdbeda788a
Tools • Dart 3.0.6 • DevTools 2.23.1

as discussed with @DanTup

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis 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