Skip to content

Commit

Permalink
fixes #80452
Browse files Browse the repository at this point in the history
  • Loading branch information
isidorn committed Sep 11, 2019
1 parent beffdb6 commit b5b8c4d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/vs/workbench/contrib/debug/browser/breakpointsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br
};
if (debugActive && !breakpoint.verified) {
return {
className: breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-unverified' : breakpoint.logMessage ? 'debug-breakpoint-log-unverified' : 'debug-breakpoint-unverified',
message: breakpoint.logMessage ? nls.localize('unverifiedLogpoint', "Unverified Logpoint") : nls.localize('unverifiedBreakopint', "Unverified Breakpoint"),
className: breakpoint instanceof DataBreakpoint ? 'debug-data-breakpoint-unverified' : breakpoint instanceof FunctionBreakpoint ? 'debug-function-breakpoint-unverified' : breakpoint.logMessage ? 'debug-breakpoint-log-unverified' : 'debug-breakpoint-unverified',
message: breakpoint.message || (breakpoint.logMessage ? nls.localize('unverifiedLogpoint', "Unverified Logpoint") : nls.localize('unverifiedBreakopint', "Unverified Breakpoint")),
};
}

Expand All @@ -665,7 +665,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br

return {
className: 'debug-function-breakpoint',
message: nls.localize('functionBreakpoint', "Function Breakpoint")
message: breakpoint.message || nls.localize('functionBreakpoint', "Function Breakpoint")
};
}

Expand All @@ -679,7 +679,7 @@ export function getBreakpointMessageAndClassName(debugService: IDebugService, br

return {
className: 'debug-data-breakpoint',
message: nls.localize('dataBreakpoint', "Data Breakpoint")
message: breakpoint.message || nls.localize('dataBreakpoint', "Data Breakpoint")
};
}

Expand Down
15 changes: 10 additions & 5 deletions src/vs/workbench/contrib/debug/common/debugModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,15 @@ export class BaseBreakpoint extends Enablement implements IBaseBreakpoint {
this.sessionId = sessionId;
}

get message(): string | undefined {
const data = this.getSessionData();
if (!data) {
return undefined;
}

return data.message;
}

get verified(): boolean {
const data = this.getSessionData();
return data ? data.verified : true;
Expand Down Expand Up @@ -585,15 +594,11 @@ export class Breakpoint extends BaseBreakpoint implements IBreakpoint {
}

get message(): string | undefined {
const data = this.getSessionData();
if (!data) {
return undefined;
}
if (this.textFileService.isDirty(this.uri)) {
return nls.localize('breakpointDirtydHover', "Unverified breakpoint. File is modified, please restart debug session.");
}

return data.message;
return super.message;
}

get adapterData(): any {
Expand Down

0 comments on commit b5b8c4d

Please sign in to comment.