diff --git a/src/vs/platform/terminal/node/ptyService.ts b/src/vs/platform/terminal/node/ptyService.ts index 3d5a98b97cd7d..ae9a5c7a7d3dc 100644 --- a/src/vs/platform/terminal/node/ptyService.ts +++ b/src/vs/platform/terminal/node/ptyService.ts @@ -46,7 +46,13 @@ export function traceRpc(_target: any, key: string, descriptor: any) { if (this.traceRpcArgs.simulatedLatency) { await timeout(this.traceRpcArgs.simulatedLatency); } - const result = await fn.apply(this, args); + let result: any; + try { + result = await fn.apply(this, args); + } catch (e) { + this.traceRpcArgs.logService.error(`[RPC Response] PtyService#${fn.name}`, e); + throw e; + } if (this.traceRpcArgs.logService.getLevel() === LogLevel.Trace) { this.traceRpcArgs.logService.trace(`[RPC Response] PtyService#${fn.name}`, result); }