mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Merge from vscode e558dc6ea73a75bd69d7a0b485f0e7e4194c66bf (#6864)
This commit is contained in:
@@ -593,13 +593,13 @@ class CallStackDataSource implements IAsyncDataSource<IDebugModel, CallStackItem
|
||||
return isDebugModel(element) || isDebugSession(element) || (element instanceof Thread && element.stopped);
|
||||
}
|
||||
|
||||
getChildren(element: IDebugModel | CallStackItem): Promise<CallStackItem[]> {
|
||||
async getChildren(element: IDebugModel | CallStackItem): Promise<CallStackItem[]> {
|
||||
if (isDebugModel(element)) {
|
||||
const sessions = element.getSessions();
|
||||
if (sessions.length === 0) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
if (sessions.length > 1 || this.debugService.getViewModel().isMultiSessionView()) {
|
||||
if (sessions.length > 1) {
|
||||
return Promise.resolve(sessions.filter(s => !s.parentSession));
|
||||
}
|
||||
|
||||
@@ -609,9 +609,10 @@ class CallStackDataSource implements IAsyncDataSource<IDebugModel, CallStackItem
|
||||
} else if (isDebugSession(element)) {
|
||||
const childSessions = this.debugService.getModel().getSessions().filter(s => s.parentSession === element);
|
||||
const threads: CallStackItem[] = element.getAllThreads();
|
||||
if (threads.length === 1 && childSessions.length === 0) {
|
||||
if (threads.length === 1) {
|
||||
// Do not show thread when there is only one to be compact.
|
||||
return this.getThreadChildren(<Thread>threads[0]);
|
||||
const children = await this.getThreadChildren(<Thread>threads[0]);
|
||||
return children.concat(childSessions);
|
||||
}
|
||||
|
||||
return Promise.resolve(threads.concat(childSessions));
|
||||
|
||||
Reference in New Issue
Block a user