Skip to content

Stacktrace links not clickable when running Flutter apps on the web #4418

Closed

Description

@rodrigo-itao

Describe the bug
The stacktrace links in debug console are not clickable (on Android Studio, the links are clickable).

To Reproduce
Steps to reproduce the behavior:

  1. Throw an exception.
  2. Try to click the links on the stacktrace.

Expected behavior
The links on the stacktrace should be clickable, to open the respective file/line.

Screenshots
Stacktrace links not clickable on VSCode:
image

Stacktrace links clickable on Android Studio:
image

Please complete the following information:

  • Operating System and version: Ubuntu 22.04.2 LTS 5.15.0-60-generic
  • VS Code version: 1.76.0
  • Dart extension version: 3.60.1
  • Dart/Flutter SDK version: flutter 3.7.5, dart 2.19.2
  • Target device (if the issue relates to Flutter debugging): web

Activity

  1. DanTup commented on Mar 2, 2023

    @DanTup
    Member

    @stevemessick does InteliJ/Android Studio have some rules about how it's handling this?

    I've filed dart-lang/webdev#949 in the past because I think this should be handled in DWDS (providing proper package: or file:/// URIs so we don't have to make assumptions about how web is laying out packages/SDK files) but if it's not an easy fix there and IntelliJ is already doing its own, maybe we should do the same in the DAP.

  2. stevemessick commented on Mar 2, 2023

    @stevemessick

    Yes, this is implemented in IntelliJ code in the plugin. IIRC there are several rules applied to convert various forms of links to file positions.

  3. added this to the On Deck milestone on Jul 27, 2023
  4. added
    in webRelates to running Dart or Flutter web apps
    in flutterRelates to running Flutter apps
    on Jul 27, 2023
  5. saropa commented on Aug 3, 2023

    @saropa

    Hi, we're having the same issue on both windows and macbook. No package paths of any kind are clickable

    • Operating System and version: Windows 11 (10.0.22621.1992)
    • VS Code version: 1.80.2
    • Flutter (Channel beta, 3.13.0-0.2.pre, on Microsoft Windows [Version 10.0.22621.1992], locale en-US)
    • Dart version 3.1.0 (build 3.1.0-262.2.beta)
    • Target device (if the issue relates to Flutter debugging): android
    
  6. FernandoUFS commented on Sep 11, 2023

    @FernandoUFS

    I'm also having the issue for more than 6 months now, it has been very hard to programming this way. I already tried reinstalling everything from scratch, but I had no success.

  7. changed the title [-]Stacktrace links not clickable[/-] [+]Stacktrace links not clickable when running Flutter apps on the web[/+] on Sep 11, 2023
  8. DanTup commented on Sep 11, 2023

    @DanTup
    Member
  9. saropa commented on Sep 11, 2023

    @saropa

    No sorry, I did not see " on the web" tacked onto this issue title.

    None in our team can currently click-through to any filename (package, app, or framework). Previously VSCode detected "package:" in the debug console and opened the file at the line number.

    e.g.

     _SaropaAppState.build package:saropa/main_app.dart 110:7⠀
    

    would open [main_app.dart] at line number 110

    *edited for clarity

  10. FernandoUFS commented on Sep 11, 2023

    @FernandoUFS

    @DanTup I'm sorry, I didn't notice the "on the web" on the title either. In my case, the problem happens running on Android, iOS or web.

    image

    I have some projects, it happens for all projects, even new ones. I can't click any error to go to file, I have to look the name, open the file and go to the line manually.
    In Android Studio works well, but I use vscode.

  11. DanTup commented on Sep 11, 2023

    @DanTup
    Member

    You didn't miss it, I only added "on the web" to the title today because I realised this one was a bit vague :-)

    Some of the non-web issues are solved on Flutter master and beta, but there are still some outstanding. It's not clear to me exactly which yours are though - if you're able to easily test on current master/beta and let me know (either in new issues, or the linked issues above that seem most relevant) that would be good to know. Thanks!

  12. FernandoUFS commented on Sep 12, 2023

    @FernandoUFS

    Now I am using the current master version:

    Flutter (Channel master, 3.14.0-14.0.pre.220, on macOS 13.5.1 22G90 darwin-arm64, locale en-BR)
    

    The files links are still not clickable. Running on Android.

    image
  13. DanTup commented on Sep 13, 2023

    @DanTup
    Member

    @FernandoUFS are you catching and printing the error yourself, or is Flutter catching it? If the former, then I think you're seeing #4711

  14. 6 remaining items

  15. adrianvintu commented on Dec 7, 2023

    @adrianvintu

    Happens to me as well since today - probably.

  16. martinsellergren commented on Mar 19, 2024

    @martinsellergren

    Same here.
    Just tried Dart extension v3.85.20240318 (pre-release), same.

    Happens on web always.
    On Android, works only if I set "dart.useLegacyDebugAdapters": true.

    Flutter 3.19.1 • channel stable • https://github.com/flutter/flutter.git
    Framework • revision abb292a07e (4 weeks ago) • 2024-02-20 14:35:05 -0800
    Engine • revision 04817c99c9
    Tools • Dart 3.3.0 • DevTools 2.31.1
    
  17. DanTup commented on Mar 19, 2024

    @DanTup
    Member

    @martinsellergren

    On Android, works only if I set "dart.useLegacyDebugAdapters": true.

    Could you file a new issue with some examples of this and a repro? This issue is specifically about web because things work a little differently there, but for Android I would expect things to work (except for non-exception stdout content, which is covered by #4711). Thanks!

  18. unknownaloy commented on May 1, 2024

    @unknownaloy

    Is there a resolution for this yet in VSCode?

  19. DanTup commented on May 13, 2024

    @DanTup
    Member

    For web specifically, unfortunately not. Based on comments in dart-lang/webdev#949 I think there may need to be some Flutter work but I'm not familiar with exactly what currently.

    If your issue is with non-web, then it's probably covered by one of:

    #5072
    #4711

    Which fixes are in-progress for.

  20. Andreigr0 commented on Oct 16, 2024

    @Andreigr0

    This helped #4711 (comment) but I don't see colors in console, whereas in IntelliJ they're showed

  21. modified the milestones: On Deck, Backlog on Dec 10, 2024
  22. modified the milestones: Backlog, v3.104.0 on Jan 20, 2025
  23. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Jan 20, 2025
  24. DanTup commented on Jan 20, 2025

    @DanTup
    Member

    This has been fixed in Flutter master and will be included in a future Flutter release:

    clicks.mp4
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 flutterRelates to running Flutter appsin webRelates to running Dart or Flutter web 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