Skip to content

Debugger pauses on exceptions in pub isolate #1576

Description

@DanTup

The issue described in #1117 has come back. Our fix was (admittedly fragile) to detect which isolates were the pub snapshot by name and set the exception type differently:

if (thread.runnable) {
let threadMode = mode;
// If the mode is set to "All Exceptions" but the thread is a snapshot from pub
// then downgrade it to Uncaught because the user is unlikely to want to be stopping
// on internal exceptions such trying to parse versions.
if (mode === "All" && thread.isInfrastructure)
threadMode = "Unhandled";
this.debugSession.observatory.setExceptionPauseMode(thread.ref.id, threadMode);
}

// Whether this thread is infrastructure (eg. not user code), useful for avoiding breaking
// on handled exceptions, etc.
get isInfrastructure(): boolean {
return this.ref && this.ref.name && this.ref.name.startsWith("pub.dart.snapshot");
}

However in a recent build, the thread names have all lost the snapshot prefixes:

v2.2.0
Screenshot 2019-04-03 at 2 54 22 pm

Today's nightly:
Screenshot 2019-04-03 at 2 53 48 pm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions