mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
debug: on continue only clear the currently debugged thread
This commit is contained in:
parent
e987744e76
commit
05d8d9eaea
|
@ -431,6 +431,7 @@ export class Model implements debug.IModel {
|
|||
if (reference) {
|
||||
this.threads[reference].clearCallStack();
|
||||
this.threads[reference].stoppedDetails = undefined;
|
||||
this.threads[reference].stopped = false;
|
||||
|
||||
if (removeThreads) {
|
||||
delete this.threads[reference];
|
||||
|
@ -439,6 +440,7 @@ export class Model implements debug.IModel {
|
|||
Object.keys(this.threads).forEach(ref => {
|
||||
this.threads[ref].clearCallStack();
|
||||
this.threads[ref].stoppedDetails = undefined;
|
||||
this.threads[ref].stopped = false;
|
||||
});
|
||||
|
||||
if (removeThreads) {
|
||||
|
@ -450,16 +452,6 @@ export class Model implements debug.IModel {
|
|||
this._onDidChangeCallStack.fire();
|
||||
}
|
||||
|
||||
public continueThreads(): void {
|
||||
for (let ref in this.threads) {
|
||||
if (this.threads.hasOwnProperty(ref)) {
|
||||
this.threads[ref].stopped = false;
|
||||
}
|
||||
}
|
||||
|
||||
this.clearThreads(false);
|
||||
}
|
||||
|
||||
public getBreakpoints(): debug.IBreakpoint[] {
|
||||
return this.breakpoints;
|
||||
}
|
||||
|
|
|
@ -268,7 +268,7 @@ export class DebugService implements debug.IDebugService {
|
|||
|
||||
this.toDisposeOnSessionEnd.push(this.session.onDidContinue(() => {
|
||||
aria.status(nls.localize('debuggingContinued', "Debugging continued."));
|
||||
this.model.continueThreads();
|
||||
this.model.clearThreads(false, this.viewModel.getFocusedThreadId());
|
||||
this.setFocusedStackFrameAndEvaluate(null).done(null, errors.onUnexpectedError);
|
||||
this.setStateAndEmit(this.configurationManager.configuration.noDebug ? debug.State.RunningNoDebug : debug.State.Running);
|
||||
}));
|
||||
|
|
|
@ -196,6 +196,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes
|
|||
this.flowEventsCount++;
|
||||
this._onDidExitAdapter.fire(<SessionExitedEvent>event);
|
||||
} else if (event.event === 'continued') {
|
||||
// TODO@Isidor continued event needs to come from the adapter
|
||||
this.flowEventsCount++;
|
||||
this._onDidContinue.fire();
|
||||
}
|
||||
|
|
|
@ -174,10 +174,6 @@ suite('Debug - Model', () => {
|
|||
assert.equal(thread2.stopped, true);
|
||||
assert.equal(thread2.getCachedCallStack(), undefined);
|
||||
|
||||
model.continueThreads();
|
||||
assert.equal(thread1.stopped, false);
|
||||
assert.equal(thread2.stopped, false);
|
||||
|
||||
model.clearThreads(true);
|
||||
assert.equal(model.getThreads[threadId1], null);
|
||||
assert.equal(model.getThreads[threadId2], null);
|
||||
|
@ -261,10 +257,6 @@ suite('Debug - Model', () => {
|
|||
assert.equal(stoppedThread.stopped, true);
|
||||
assert.equal(stoppedThread.getCachedCallStack(), undefined);
|
||||
|
||||
model.continueThreads();
|
||||
assert.equal(runningThread.stopped, false);
|
||||
assert.equal(stoppedThread.stopped, false);
|
||||
|
||||
model.clearThreads(true);
|
||||
assert.equal(model.getThreads[stoppedThreadId], null);
|
||||
assert.equal(model.getThreads[runningThreadId], null);
|
||||
|
|
Loading…
Reference in a new issue