Skip to content

Some Dart SDK sources are missing from the Flutter SDK / sky_engine preventing debugging into them #184333

Closed

Description

@DanTup

Steps to reproduce

This was originally raised at Dart-Code/Dart-Code#6001 by @FMorschel. A similar issue has come up before at #151171 and #168004. The issue appears to be that Flutter maintains a list of Dart SDK source files to be copied into sky_engine but that set is not complete.

To reproduce:

  • Create a new Flutter app in VS Code
  • Paste the sample code included below, which calls .map().toList() on a list
  • Add a breakpoint on the marked line
  • Run the code as a Flutter app (I used Windows, but @FMorschel used Android) and hit the breakpoint
  • Try to navigate to the implementation of new List.of() in the call stack

Expected results

The debugger should open the array_patch.dart file and show you the source code for this frame. This happens correctly in a non-Flutter app (using either a standalone Dart SDK, or the Dart SDK embedded in the Flutter SDK):

Image

Actual results

For a Flutter app (which uses sky_engine instead of the raw Dart SDK paths), the file is missing:

Image

Other stack frames work fine, but there appears to be a few files missing from the sky_engine package compared to the Dart SDK:

Image

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              final items = [1, 2, 3];
              final mapped = items.map((e) => e * 2).toList();
              bool test(int e) {
                return e > 4; // Breakpoint here
              }

              mapped.where(test).toList();
            },
            child: const Text('Trigger List.from'),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
PS D:\Dev\Google\Flutter\Flutter main> flutter doctor -v
[!] Flutter (Channel master, 3.43.0-1.0.pre-353, on Microsoft Windows [Version 10.0.26200.8037], locale en-GB) [2.7s]
    • Flutter version 3.43.0-1.0.pre-353 on channel master at D:\Dev\Google\Flutter\Flutter main
    ! Warning: `dart` on your path resolves to D:\Tools\Dart\Stable\bin\dart.exe, which is not inside your current Flutter SDK checkout at
      D:\Dev\Google\Flutter\Flutter main. Consider adding D:\Dev\Google\Flutter\Flutter main\bin to the front of your path.
    ! Upstream repository [email protected]:DanTup/flutter.git is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to [email protected]:DanTup/flutter.git to dismiss this error.
    • Framework revision 97197427ce (2 hours ago), 2026-03-30 04:55:10 -0400
    • Engine revision 97197427ce
    • Dart version 3.12.0 (build 3.12.0-300.0.dev)
    • DevTools version 2.57.0-dev.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations,
      enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration, enable-riscv64
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and
      upgrades.

[✓] Windows Version (11 Pro 64-bit, 25H2, 2009) [562ms]

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,481ms]
    • Android SDK at C:\Users\danny\AppData\Local\Android\sdk
    • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
    • Platform android-36, build-tools 35.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.8+-14196175-b1038.72)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Chrome - develop for the web [50ms]
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.2.0) [49ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\18\Community
    • Visual Studio Community 2026 version 18.2.11408.102
    • Windows 10 SDK version 10.0.26100.0

[✓] Connected device (3 available) [91ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.26200.8037]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 146.0.7680.165
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 144.0.3719.92

[✓] Network resources [525ms]
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Activity

  1. FMorschel commented on Mar 30, 2026

    @FMorschel
    Contributor

    Is there any way we could identify this automatically and send data to the Flutter team whenever this happens? So the user doesn't need to keep opening issues for these?

  2. saurabh-mirajkar commented on Mar 31, 2026

    @saurabh-mirajkar
    Contributor

    @DanTup Thanks for the report. Labelling for team-engine to investigate further.

  3. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    a: debuggingDebugging, breakpoints, expression evaluation
    and removed
    in triagePresently being triaged by the triage team
    on Mar 31, 2026
  4. self-assigned this
    on Apr 6, 2026
  5. added
    P2Important issues not at the top of the work list
    on Apr 6, 2026
  6. jason-simmons commented on Apr 6, 2026

    @jason-simmons
    Member
  7. DanTup commented on Apr 6, 2026

    @DanTup
    ContributorAuthor

    Thanks!

  8. DanTup commented on Apr 6, 2026

    @DanTup
    ContributorAuthor

    @FMorschel I missed your comment above:

    Is there any way we could identify this automatically and send data to the Flutter team whenever this happens?

    I can't think of a good way to do this, but I do wonder whether a test somewhere could compare the two. Although having test fail here in Flutter when it requires an SDK change to fix would probably be inconvenient. I'm not all that familiar with these files though, I wonder if @jason-simmons has any ideas.

  9. github-actions commented on Apr 20, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  10. locked as resolved and limited conversation to collaborators on Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: debuggingDebugging, breakpoints, expression evaluationteam-engineOwned by Engine teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-engineTriaged by Engine team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions