From 9881b3cd3f806b56d76361d763ed89c41ee2b6e2 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 13 Aug 2017 21:51:57 -0700 Subject: [PATCH] Fix #226 - fix for old runtimes that don't support setAsyncCallStackDepth --- src/chrome/chromeDebugAdapter.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/chrome/chromeDebugAdapter.ts b/src/chrome/chromeDebugAdapter.ts index 7f7d2379c..5340fa202 100644 --- a/src/chrome/chromeDebugAdapter.ts +++ b/src/chrome/chromeDebugAdapter.ts @@ -368,7 +368,12 @@ export abstract class ChromeDebugAdapter implements IDebugAdapter { await Promise.all(this.runConnection()); const maxDepth = this._launchAttachArgs.showAsyncStacks ? ChromeDebugAdapter.ASYNC_CALL_STACK_DEPTH : 0; - return this.chrome.Debugger.setAsyncCallStackDepth({ maxDepth }); + try { + return this.chrome.Debugger.setAsyncCallStackDepth({ maxDepth }); + } catch (e) { + // Not supported by older runtimes, ignore it. + return; + } } else { return Promise.resolve(); }