Skip to content

Commit

Permalink
fixes #79923
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Aug 28, 2019
1 parent a7c2a5a commit 44fa853
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/breakpointsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br

if (!breakpoint.enabled || !debugService.getModel().areBreakpointsActivated()) {
return {
className: breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-disabled' : breakpoint.logMessage ? 'debug-breakpoint-log-disabled' : 'debug-breakpoint-disabled',
className: breakpoint instanceof DataBreakpoint ? 'debug-data-breakpoint-disabled' : breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-disabled' : breakpoint.logMessage ? 'debug-breakpoint-log-disabled' : 'debug-breakpoint-disabled',
message: breakpoint.logMessage ? nls.localize('disabledLogpoint', "Disabled logpoint") : nls.localize('disabledBreakpoint', "Disabled breakpoint"),
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/contrib/debug/browser/debugActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class RemoveAllBreakpointsAction extends AbstractDebugAction {

protected isEnabled(state: State): boolean {
const model = this.debugService.getModel();
return super.isEnabled(state) && (model.getBreakpoints().length > 0 || model.getFunctionBreakpoints().length > 0);
return super.isEnabled(state) && (model.getBreakpoints().length > 0 || model.getFunctionBreakpoints().length > 0 || model.getDataBreakpoints().length > 0);
}
}

Expand Down Expand Up @@ -272,7 +272,7 @@ export class ToggleBreakpointsActivatedAction extends AbstractDebugAction {
}

protected isEnabled(state: State): boolean {
return (this.debugService.getModel().getFunctionBreakpoints().length + this.debugService.getModel().getBreakpoints().length) > 0;
return !!(this.debugService.getModel().getFunctionBreakpoints().length || this.debugService.getModel().getBreakpoints().length || this.debugService.getModel().getDataBreakpoints().length);
}
}

Expand All @@ -292,7 +292,7 @@ export class ReapplyBreakpointsAction extends AbstractDebugAction {
protected isEnabled(state: State): boolean {
const model = this.debugService.getModel();
return super.isEnabled(state) && (state === State.Running || state === State.Stopped) &&
(model.getFunctionBreakpoints().length + model.getBreakpoints().length + model.getExceptionBreakpoints().length > 0);
((model.getFunctionBreakpoints().length + model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getDataBreakpoints().length) > 0);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
background: url('breakpoint-function-disabled.svg') center center no-repeat;
}

.debug-data-breakpoint {
background: url('breakpoint-data.svg') center center no-repeat;
}

.debug-data-breakpoint-unverified {
background: url('breakpoint-data-unverified.svg') center center no-repeat;
}

.debug-data-breakpoint-disabled {
background: url('breakpoint-data-disabled.svg') center center no-repeat;
}

.debug-breakpoint-conditional,
.monaco-editor .debug-breakpoint-column.debug-breakpoint-conditional-column::before {
background: url('breakpoint-conditional.svg') center center no-repeat;
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/contrib/debug/common/debugModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1065,9 +1065,9 @@ export class DebugModel implements IDebugModel {
}

setEnablement(element: IEnablement, enable: boolean): void {
if (element instanceof Breakpoint || element instanceof FunctionBreakpoint || element instanceof ExceptionBreakpoint) {
const changed: Array<IBreakpoint | IFunctionBreakpoint> = [];
if (element.enabled !== enable && (element instanceof Breakpoint || element instanceof FunctionBreakpoint)) {
if (element instanceof Breakpoint || element instanceof FunctionBreakpoint || element instanceof ExceptionBreakpoint || element instanceof DataBreakpoint) {
const changed: Array<IBreakpoint | IFunctionBreakpoint | IDataBreakpoint> = [];
if (element.enabled !== enable && (element instanceof Breakpoint || element instanceof FunctionBreakpoint || element instanceof DataBreakpoint)) {
changed.push(element);
}

Expand Down

0 comments on commit 44fa853

Please sign in to comment.