Skip to content

Commit

Permalink
Improve error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTup committed Sep 10, 2019
1 parent eb4f75d commit d0b5acd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/debug/dart_debug_impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,16 @@ export class DartDebugSession extends DebugSession {
}

private async handlePauseEvent(event: VMEvent) {
if (!event.isolate) {
this.logger.warn(`Unable to handle pause event (${event.kind}) that had no isolate`);
return;
}

const kind = event.kind;
const thread = event.isolate ? this.threadManager.getThreadInfoFromRef(event.isolate) : undefined;
const thread = this.threadManager.getThreadInfoFromRef(event.isolate);

if (!event.isolate || !thread) {
this.logger.warn("No thread for pause event");
if (!thread) {
this.logger.warn(`ThreadManager couldn't find thread with ref ${event.isolate.id} to handle ${kind}`);
return;
}

Expand Down

0 comments on commit d0b5acd

Please sign in to comment.