Skip to content

Commit

Permalink
[node-debug] fix eclipse-theia#4176: fixes for `Toggle skipping this …
Browse files Browse the repository at this point in the history
…file` command

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
  • Loading branch information
akosyakov committed Jan 30, 2019
1 parent ab5596e commit d76196d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
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>;
}

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 @@ -195,7 +195,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

0 comments on commit d76196d

Please sign in to comment.