Skip to content

Commit

Permalink
[debug] fix eclipse-theia#3601: apply StoppedDetails only from stoppe…
Browse files Browse the repository at this point in the history
…d event

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
  • Loading branch information
akosyakov authored and thegecko committed Nov 23, 2018
1 parent c86a33b commit 8891c2a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions packages/debug/src/browser/debug-session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import * as React from 'react';
import { WebSocketConnectionProvider, LabelProvider } from '@theia/core/lib/browser';
import { DebugProtocol } from 'vscode-debugprotocol';
import { Emitter, Event, DisposableCollection, Disposable, MessageClient, MessageType } from '@theia/core/lib/common';
import { Emitter, Event, DisposableCollection, Disposable, MessageClient, MessageType, Mutable } from '@theia/core/lib/common';
import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
import { EditorManager } from '@theia/editor/lib/browser';
import { CompositeTreeElement } from '@theia/core/lib/browser/source-tree';
import { DebugConfiguration } from '../common/debug-configuration';
import { DebugSessionConnection, DebugRequestTypes, DebugEventTypes } from './debug-session-connection';
import { DebugThread, StoppedDetails } from './model/debug-thread';
import { DebugThread, StoppedDetails, DebugThreadData } from './model/debug-thread';
import { DebugScope } from './console/debug-console-items';
import { DebugStackFrame } from './model/debug-stack-frame';
import { DebugSource } from './model/debug-source';
Expand Down Expand Up @@ -334,10 +334,11 @@ export class DebugSession implements CompositeTreeElement {
const id = raw.id;
const thread = existing.get(id) || new DebugThread(this);
this._threads.set(id, thread);
thread.update({
raw,
stoppedDetails: stoppedDetails && stoppedDetails.threadId === id ? stoppedDetails : undefined
});
const data: Partial<Mutable<DebugThreadData>> = { raw };
if (stoppedDetails && (stoppedDetails.allThreadsStopped || stoppedDetails.threadId === id)) {
data.stoppedDetails = stoppedDetails;
}
thread.update(data);
}
this.updateCurrentThread(stoppedDetails);
}
Expand Down

0 comments on commit 8891c2a

Please sign in to comment.