Skip to content

Show more stack trace information #2668

@johnpryan

Description

@johnpryan

Exceptions in DartPad should contain more information like the line number and full stack trace.

Example

This program throws a TypeError:

void main() {
  var map = <String, dynamic>{};
  String s = map['foo'];
  print(s);
}
Unhandled exception:
type 'Null' is not a subtype of type 'String'
#0      main (file:///Users/ryjohn/Desktop/foo/bin/foo.dart:3:10)
#1      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:296:19)
#2      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189:12)

But in DartPad, only the first line is printed:

Uncaught Error: TypeError: null: type 'JSNull' is not a subtype of type 'String'

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1A high priority bug; for example, a single project is unusable or has many test failuresarea-error-messagingclosed-duplicateClosed in favor of an existing reporttype-uxA user experience or user interface related issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions