diff --git a/src/plugin/adapter-registry/amalgamator-gdb-tracker.ts b/src/plugin/adapter-registry/amalgamator-gdb-tracker.ts index efc31b9..9176ed1 100644 --- a/src/plugin/adapter-registry/amalgamator-gdb-tracker.ts +++ b/src/plugin/adapter-registry/amalgamator-gdb-tracker.ts @@ -90,7 +90,11 @@ export class AmalgamatorGdbVariableTransformer extends AdapterVariableTracker { } async getCurrentContext(_session: vscode.DebugSession): Promise { - return Promise.resolve(this.currentContext); + const curContext = this.contexts?.length ? + (this.contexts?.filter(context => context.id === this.currentContext?.id).shift() ?? + this.currentContext) : + this.currentContext; + return Promise.resolve(curContext); } readMemory(session: vscode.DebugSession, args: ReadMemoryArguments, context: Context): Promise {