src/goDebugFactory: increase timeout for dlv dap server start
Some users are experiencing slow dlv dap server start.
The root cause of this slow start still needs investigation.
For golang/vscode-go#1693
Change-Id: Ie932bc2b9b7d273e0be2553b9fc154f2ae0b3ead
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/342632
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
diff --git a/src/goDebugFactory.ts b/src/goDebugFactory.ts
index 241cee6..a71b53e 100644
--- a/src/goDebugFactory.ts
+++ b/src/goDebugFactory.ts
@@ -418,13 +418,13 @@
const p = spawn(dlvPath, dlvArgs, {
cwd: dir,
env,
- stdio: ['pipe', 'pipe', 'pipe', 'pipe'] // --log-dest=3
+ stdio: onWindows ? ['pipe', 'pipe', 'pipe'] : ['pipe', 'pipe', 'pipe', 'pipe'] // --log-dest=3 if !onWindows.
});
let started = false;
- const timeoutToken: NodeJS.Timer = setTimeout(
- () => reject(new Error('timed out while waiting for DAP server to start')),
- 5_000
- );
+ const timeoutToken: NodeJS.Timer = setTimeout(() => {
+ logConsole(`Delve DAP server (PID: ${p.pid}) is not responding`);
+ reject(new Error('timed out while waiting for DAP server to start'));
+ }, 30_000);
const stopWaitingForServerToStart = () => {
clearTimeout(timeoutToken);