提交 20e24e87 编写于 作者: I isidor

debug: do not store breakpoints activated, it should only be a temporarty state

上级 7f94be72
......@@ -50,7 +50,6 @@ import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
import { CancellationTokenSource } from 'vs/base/common/cancellation';
const DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint';
const DEBUG_BREAKPOINTS_ACTIVATED_KEY = 'debug.breakpointactivated';
const DEBUG_FUNCTION_BREAKPOINTS_KEY = 'debug.functionbreakpoint';
const DEBUG_DATA_BREAKPOINTS_KEY = 'debug.databreakpoint';
const DEBUG_EXCEPTION_BREAKPOINTS_KEY = 'debug.exceptionbreakpoint';
......@@ -129,7 +128,7 @@ export class DebugService implements IDebugService {
this.debugState = CONTEXT_DEBUG_STATE.bindTo(contextKeyService);
this.inDebugMode = CONTEXT_IN_DEBUG_MODE.bindTo(contextKeyService);
this.model = new DebugModel(this.loadBreakpoints(), this.storageService.getBoolean(DEBUG_BREAKPOINTS_ACTIVATED_KEY, StorageScope.WORKSPACE, true), this.loadFunctionBreakpoints(),
this.model = new DebugModel(this.loadBreakpoints(), this.loadFunctionBreakpoints(),
this.loadExceptionBreakpoints(), this.loadDataBreakpoints(), this.loadWatchExpressions(), this.textFileService);
this.toDispose.push(this.model);
......@@ -901,12 +900,6 @@ export class DebugService implements IDebugService {
setBreakpointsActivated(activated: boolean): Promise<void> {
this.model.setBreakpointsActivated(activated);
if (activated) {
this.storageService.store(DEBUG_BREAKPOINTS_ACTIVATED_KEY, 'false', StorageScope.WORKSPACE);
} else {
this.storageService.remove(DEBUG_BREAKPOINTS_ACTIVATED_KEY, StorageScope.WORKSPACE);
}
return this.sendAllBreakpoints();
}
......
......@@ -797,13 +797,13 @@ export class DebugModel implements IDebugModel {
private toDispose: lifecycle.IDisposable[];
private schedulers = new Map<string, RunOnceScheduler>();
private breakpointsSessionId: string | undefined;
private breakpointsActivated = true;
private readonly _onDidChangeBreakpoints: Emitter<IBreakpointsChangeEvent | undefined>;
private readonly _onDidChangeCallStack: Emitter<void>;
private readonly _onDidChangeWatchExpressions: Emitter<IExpression | undefined>;
constructor(
private breakpoints: Breakpoint[],
private breakpointsActivated: boolean,
private functionBreakpoints: FunctionBreakpoint[],
private exceptionBreakpoints: ExceptionBreakpoint[],
private dataBreakopints: DataBreakpoint[],
......
......@@ -24,7 +24,7 @@ suite('Debug - Model', () => {
let rawSession: MockRawSession;
setup(() => {
model = new DebugModel([], true, [], [], [], [], <any>{ isDirty: (e: any) => false });
model = new DebugModel([], [], [], [], [], <any>{ isDirty: (e: any) => false });
rawSession = new MockRawSession();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册