Merge from vscode 0f73473c08055054f317c1c94502f7f39fdbb164 (#6892)

* Merge from vscode 0f73473c08055054f317c1c94502f7f39fdbb164

* fix tslinting
This commit is contained in:
Anthony Dresser
2019-08-22 22:07:01 -07:00
committed by GitHub
parent 1372cbaee1
commit 658cf51887
91 changed files with 1092 additions and 317 deletions

View File

@@ -590,7 +590,12 @@ class CallStackDataSource implements IAsyncDataSource<IDebugModel, CallStackItem
constructor(private debugService: IDebugService) { }
hasChildren(element: IDebugModel | CallStackItem): boolean {
return isDebugModel(element) || isDebugSession(element) || (element instanceof Thread && element.stopped);
if (isDebugSession(element)) {
const threads = element.getAllThreads();
return (threads.length > 1) || (threads.length === 1 && threads[0].stopped) || (this.debugService.getModel().getSessions().filter(s => s.parentSession === element).length > 0);
}
return isDebugModel(element) || (element instanceof Thread && element.stopped);
}
async getChildren(element: IDebugModel | CallStackItem): Promise<CallStackItem[]> {