diff --git a/src/vs/workbench/contrib/debug/browser/debugProgress.ts b/src/vs/workbench/contrib/debug/browser/debugProgress.ts index 6b4b9b854321ff7644b099877a5d956c3f050248..ec8e239c141eec41d462223f988ca73b550c6726 100644 --- a/src/vs/workbench/contrib/debug/browser/debugProgress.ts +++ b/src/vs/workbench/contrib/debug/browser/debugProgress.ts @@ -43,15 +43,17 @@ export class DebugProgressContribution implements IWorkbenchContribution { source, delay: 500 }, progressStep => { - let increment = 0; + let total = 0; const reportProgress = (progress: { message?: string, percentage?: number }) => { + let increment = undefined; if (typeof progress.percentage === 'number') { - increment = progress.percentage - increment; + increment = progress.percentage - total; + total += increment; } progressStep.report({ message: progress.message, - increment: typeof progress.percentage === 'number' ? increment : undefined, - total: typeof progress.percentage === 'number' ? 100 : undefined, + increment, + total: typeof increment === 'number' ? 100 : undefined, }); }; @@ -60,7 +62,6 @@ export class DebugProgressContribution implements IWorkbenchContribution { } const progressUpdateListener = session.onDidProgressUpdate(e => { if (e.body.progressId === progressStartEvent.body.progressId) { - reportProgress(e.body); } });