Skip to content

Debug Console doesn't add clickable links for stdout output line start with string different #number when using new Flutter SDK debug adapters #5360

Closed

Description

@quyenvsp

Describe the bug
Continue #4711 (comment)
Issue not resolved yet
new Flutter SDK debug adapters only handle stdout line start with #0 #1,...
all other lines start with any other strings like [log], flutter,... will not clickable

To Reproduce
Steps to reproduce the behavior:

  1. Use latest Flutter master channel create new project flutter create .
  2. Add example code in build method
    final stack = StackTrace.current.toString().split('\n').take(2).join('\n');
    final stack2 = '\n$stack';
    log(stack);
    debugPrint(stack);
    log(stack2);
    debugPrint(stack2);

Expected behavior
All line with stacktrace location should clickable even this line start with any string not #0, #1,...

Screenshots
2024-12-03_112937

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 Build 22635.4515
  • VS Code version: 1.95.3 (System setup)
  • Dart extension version: v3.102.3
  • Dart/Flutter SDK version: v3.102.3
  • Target device (if the issue relates to Flutter debugging):

Activity

  1. DanTup commented on Dec 12, 2024

    @DanTup
    Member

    Looks like this is because package:stack_trace that we use for parsing frames is quite strict about the frames and doesn't handle when there are prefixes. There are some other issues with using it too, so I'm going to switch to just extracting the paths with a regex instead.

    With the changes, all of these seem to work correctly:

    image

  2. added this to the v3.104.0 milestone on Dec 12, 2024
  3. added
    in flutterRelates to running Flutter apps
    in debuggingRelates to the debug adapter or process of running debug sessions
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Dec 12, 2024
  4. DanTup commented on Dec 12, 2024

    @DanTup
    Member
  5. modified the milestones: v3.104.0, v3.106.0 on Dec 19, 2024
  6. modified the milestones: v3.106.0, v3.104.0 on Dec 30, 2024
  7. DanTup commented on Jan 6, 2025

    @DanTup
    Member

    This was merged in dart-lang/sdk@131fe7b. The change is in the SDKs, so will show up in a future SDK release (not a VS Code extension release).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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