Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/debug/src/browser/model/debug-thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@ export class DebugThread extends DebugThreadData implements TreeElement {

update(data: Partial<DebugThreadData>): void {
Object.assign(this, data);
if ('stoppedDetails' in data) {
this.clearFrames();
}
}

clear(): void {
this.update({
raw: this.raw,
stoppedDetails: undefined
});
this.clearFrames();
}

continue(): Promise<DebugProtocol.ContinueResponse> {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/api/plugin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ export interface DebugMain {
$addBreakpoints(breakpoints: Breakpoint[]): Promise<void>;
$removeBreakpoints(breakpoints: Breakpoint[]): Promise<void>;
$startDebugging(folder: theia.WorkspaceFolder | undefined, nameOrConfiguration: string | theia.DebugConfiguration): Promise<boolean>;
$customRequest(command: string, args?: any): Promise<DebugProtocol.Response>;
$customRequest(sessionId: string, command: string, args?: any): Promise<DebugProtocol.Response>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we add new method or add argument at the end to not break ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm is that in fact there were a problem, command was being sent instead of sessionId ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought it was a mistake in the first place, implementation has different method signature and was broken before by using command as sessionId:
https://github.com/theia-ide/theia/blob/438efefd9b90e53aa58f54f2a8dfd50af8ba045b/packages/plugin-ext/src/main/browser/debug/debug-main.ts#L196

}

export const PLUGIN_RPC_CONTEXT = {
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-ext/src/plugin/node/debug/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ export class DebugExtImpl implements DebugExt {
}

async $sessionDidChange(sessionId: string | undefined): Promise<void> {
const activeDebugSession = sessionId ? this.sessions.get(sessionId) : undefined;
this.onDidChangeActiveDebugSessionEmitter.fire(activeDebugSession);
this.activeDebugSession = sessionId ? this.sessions.get(sessionId) : undefined;
this.onDidChangeActiveDebugSessionEmitter.fire(this.activeDebugSession);
}

async $breakpointsDidChange(all: Breakpoint[], added: Breakpoint[], removed: Breakpoint[], changed: Breakpoint[]): Promise<void> {
Expand All @@ -190,7 +190,7 @@ export class DebugExtImpl implements DebugExt {
sessionId,
debugConfiguration,
communicationProvider,
(command: string, args?: any) => this.proxy.$customRequest(command, args));
(command: string, args?: any) => this.proxy.$customRequest(sessionId, command, args));
this.sessions.set(sessionId, debugAdapterSession);

const connection = await this.connectionExt!.ensureConnection(sessionId);
Expand Down