diff --git a/src/debugAdapter/goDebug.ts b/src/debugAdapter/goDebug.ts index 68b3257125..34e7d2e35f 100644 --- a/src/debugAdapter/goDebug.ts +++ b/src/debugAdapter/goDebug.ts @@ -26,7 +26,8 @@ import { StackFrame, StoppedEvent, TerminatedEvent, - Thread + Thread, + ErrorDestination } from 'vscode-debugadapter'; import { DebugProtocol } from 'vscode-debugprotocol'; import { @@ -1586,9 +1587,18 @@ export class GoDebugSession extends LoggingDebugSession { log('EvaluateResponse'); }, (err) => { + let dest: ErrorDestination; + // No need to repeatedly show the error pop-up when expressions + // are continiously reevaluated in the Watch panel, which + // already displays errors. + if (args.context === 'watch') { + dest = null + } else { + dest = ErrorDestination.User + } this.sendErrorResponse(response, 2009, 'Unable to eval expression: "{e}"', { e: err.toString() - }); + }, dest); } ); }