debugAdapter: fix a bug where we are not sending back configuration done response
This change is to address this bug: https://github.com/eclipse-theia/theia/issues/8455. The Go extension is not able to continue past after hitting the breakpoint because `setConfigurationDoneRequest` is not sending back a response if the program is already running. This keeps Theia waiting for the response (which it never receives!).
Change-Id: Ie416638793d4c4505d9dd6b9e34753b60188ac5d
GitHub-Last-Rev: 5423aaea32c438b9e2e38f779eaaaf2f02071c84
GitHub-Pull-Request: golang/vscode-go#641
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/254959
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Trust: Quoc Truong <quoct@google.com>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts
index b6cc94a..4c2359c 100644
--- a/src/debugAdapter/goDebug.ts
+++ b/src/debugAdapter/goDebug.ts
@@ -873,13 +873,15 @@
if (this.stopOnEntry) {
this.sendEvent(new StoppedEvent('entry', 1));
log('StoppedEvent("entry")');
- this.sendResponse(response);
} else {
this.debugState = await this.delve.getDebugState();
if (!this.debugState.Running) {
- this.continueRequest(<DebugProtocol.ContinueResponse>response);
+ log('Changing DebugState from Halted to Running');
+ this.continue();
}
}
+ this.sendResponse(response);
+ log('ConfigurationDoneResponse', response);
}
/**