Skip to content

Commit 58c241a

Browse files
author
Akos Kitta
committed
fix: progress title
1 parent 94f0816 commit 58c241a

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed
66 Bytes
Binary file not shown.

Diff for: src/debug.ts

+6-10
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ export interface StartDebugParams {
6868
*/
6969
readonly programmer?: string;
7070
/**
71-
* Custom progress message to use when getting the debug information from the CLI.
71+
* Custom progress title to use when getting the debug information from the CLI.
7272
*/
73-
readonly message?: string;
73+
readonly title?: string;
7474
}
7575
export type StartDebugResult = boolean;
7676

@@ -146,10 +146,7 @@ async function createLaunchConfig(
146146
}
147147
const { file, args } = buildDebugInfoArgs(params);
148148
const [stdout, customConfigs] = await Promise.all([
149-
withProgress(
150-
() => exec(file, args),
151-
params.message ? params.message : getDebugInfoMessage
152-
),
149+
withProgress(() => exec(file, args), params.title ?? getDebugInfoMessage),
153150
loadDebugCustomJson(params),
154151
]);
155152
const debugInfo = await parseRawDebugInfo(stdout);
@@ -169,15 +166,14 @@ async function createLaunchConfig(
169166

170167
async function withProgress<T>(
171168
task: () => Promise<T> | T,
172-
message: string
169+
title: string
173170
): Promise<T> {
174171
return vscode.window.withProgress(
175-
{ location: vscode.ProgressLocation.Window },
176-
async (progress, token) => {
172+
{ location: vscode.ProgressLocation.Window, title },
173+
async (_, token) => {
177174
if (token.isCancellationRequested) {
178175
throw new vscode.CancellationError();
179176
}
180-
progress.report({ message });
181177
const result = await task();
182178
return result as T;
183179
}

0 commit comments

Comments
 (0)