Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
debug: use any active goroutine when debugState.currentGoroutine is null
Browse files Browse the repository at this point in the history
  • Loading branch information
xiphon committed Jan 12, 2019
1 parent 3648a2e commit e56e19c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,9 @@ class GoDebugSession extends LoggingDebugSession {
}
const goroutines = this.delve.isApiV1 ? <DebugGoroutine[]>out : (<ListGoroutinesOut>out).Goroutines;
this.updateThreads(goroutines);
if (!this.debugState.currentGoroutine && goroutines.length > 0) {
this.debugState.currentGoroutine = goroutines[0];
}

let stoppedEvent = new StoppedEvent(reason, this.debugState.currentGoroutine.id);
(<any>stoppedEvent.body).allThreadsStopped = true;
Expand Down

0 comments on commit e56e19c

Please sign in to comment.