src/vs/workbench/contrib/debug/common/debugModel.ts/DebugModel/fetchCallStack
class DebugModel:	fetchCallStack(thread: Thread): { topCallStack: Promise<void>; wholeCallStack: Promise<void> } {
		if (thread.session.capabilities.supportsDelayedStackTraceLoading) {
			// For improved performance load the first stack frame and then load the rest async.
			let topCallStack = Promise.resolve();
			const wholeCallStack = new Promise<void>((c, e) => {
				topCallStack = thread.fetchCallStack(1).then(() => {
					if (!this.schedulers.has(thread.getId())) {
						this.schedulers.set(thread.getId(), new RunOnceScheduler(() => {
							thread.fetchCallStack(19).then(() => {
								const stale = thread.getStaleCallStack();
								const current = thread.getCallStack();
								let bottomOfCallStackChanged = stale.length !== current.length;
								for (let i = 1; i < stale.length && !bottomOfCallStackChanged; i++) {
									bottomOfCallStackChanged = !stale[i].equals(current[i]);
								}

								if (bottomOfCallStackChanged) {
									this._onDidChangeCallStack.fire();
								}
								c();
							});
						}, 420));
					}

					this.schedulers.get(thread.getId())!.schedule();
					this._onDidChangeCallStack.fire();
				});
			});

			return { topCallStack, wholeCallStack };
		}

		const wholeCallStack = thread.fetchCallStack();
		return { wholeCallStack, topCallStack: wholeCallStack };
	}