Skip to content

Consider using package:stacktrace in flutter in --debug mode #3810

Closed

Description

@eseidelGoogle

@devoncarew says this can give us nicer stacktraces. Here is an example from the flutter_tools:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/executable.dart#L80

Presumably we'd only need/want this in --debug mode?

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on May 9, 2016
  2. Hixie commented on May 10, 2016

    @Hixie
    Contributor

    I'm actually not really convinced they're better. They don't show the full filenames, for example, which messes with IDEs. I'm working on stuff on my test branch that will trim down the stack traces to be just the interesting frames, but that depends on them being in the format that StackTrace emits. If people want them to be prettier in other ways I'm happy to add support for that to the foundation library.

  3. devoncarew commented on May 10, 2016

    @devoncarew
    Contributor

    Yeah, I think the nice part that the stack_trace package provides is a view across several async calls. We can do that ourselves; I think most of the work for that for stack_trace is done here: https://github.com/dart-lang/stack_trace/blob/master/lib/src/stack_zone_specification.dart.

  4. Hixie commented on May 10, 2016

    @Hixie
    Contributor

    Do you have an example (in Flutter specifically) where the cross-async-call stack_trace logic actually works and gives something useful?

  5. devoncarew commented on May 10, 2016

    @devoncarew
    Contributor

    No, I haven't tried using it in flutter. I've found it useful - in dart:io apps - with code that uses async or Futures. Exceptions (like this one: #3825) are easier to debug then if you only have the top set of frames.

  6. Hixie commented on May 13, 2016

    @Hixie
    Contributor

    I'm going to close this in favour of the older #130 which is the more general issue on the same topic.

  7. github-actions commented on Sep 6, 2021

    @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.

  8. locked as resolved and limited conversation to collaborators on Sep 6, 2021
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

    frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions