debug: adopt description

fixes #22398
This commit is contained in:
isidor
2017-03-10 16:20:33 +01:00
parent f42d34da02
commit c0d61afc98
3 changed files with 4 additions and 3 deletions
@@ -49,6 +49,7 @@ export interface IRawModelUpdate {
export interface IRawStoppedDetails {
reason: string;
description?: string;
threadId?: number;
text?: string;
totalFrames?: number;
@@ -510,8 +510,8 @@ export class CallStackRenderer implements IRenderer {
data.thread.title = nls.localize('thread', "Thread");
data.name.textContent = thread.name;
data.stateLabel.textContent = thread.stopped ? nls.localize({ key: 'pausedOn', comment: ['indicates reason for program being paused'] }, "Paused on {0}", thread.stoppedDetails.reason)
: nls.localize({ key: 'running', comment: ['indicates state'] }, "Running");
const description = thread.stoppedDetails.description || nls.localize({ key: 'pausedOn', comment: ['indicates reason for program being paused'] }, "Paused on {0}", thread.stoppedDetails.reason);
data.stateLabel.textContent = thread.stopped ? description : nls.localize({ key: 'running', comment: ['indicates state'] }, "Running");
}
private renderError(element: string, data: IErrorTemplateData) {
@@ -277,7 +277,7 @@ export class CallStackView extends CollapsibleViewletView {
// Only show the global pause message if we do not display threads.
// Otherwsie there will be a pause message per thread and there is no need for a global one.
if (newTreeInput instanceof Thread && newTreeInput.stoppedDetails) {
this.pauseMessageLabel.text(nls.localize('debugStopped', "Paused on {0}", newTreeInput.stoppedDetails.reason));
this.pauseMessageLabel.text(newTreeInput.stoppedDetails.description || nls.localize('debugStopped', "Paused on {0}", newTreeInput.stoppedDetails.reason));
if (newTreeInput.stoppedDetails.text) {
this.pauseMessageLabel.title(newTreeInput.stoppedDetails.text);
}