@@ -68,9 +68,9 @@ export interface StartDebugParams {
68
68
*/
69
69
readonly programmer ?: string ;
70
70
/**
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.
72
72
*/
73
- readonly message ?: string ;
73
+ readonly title ?: string ;
74
74
}
75
75
export type StartDebugResult = boolean ;
76
76
@@ -146,10 +146,7 @@ async function createLaunchConfig(
146
146
}
147
147
const { file, args } = buildDebugInfoArgs ( params ) ;
148
148
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 ) ,
153
150
loadDebugCustomJson ( params ) ,
154
151
] ) ;
155
152
const debugInfo = await parseRawDebugInfo ( stdout ) ;
@@ -169,15 +166,14 @@ async function createLaunchConfig(
169
166
170
167
async function withProgress < T > (
171
168
task : ( ) => Promise < T > | T ,
172
- message : string
169
+ title : string
173
170
) : Promise < T > {
174
171
return vscode . window . withProgress (
175
- { location : vscode . ProgressLocation . Window } ,
176
- async ( progress , token ) => {
172
+ { location : vscode . ProgressLocation . Window , title } ,
173
+ async ( _ , token ) => {
177
174
if ( token . isCancellationRequested ) {
178
175
throw new vscode . CancellationError ( ) ;
179
176
}
180
- progress . report ( { message } ) ;
181
177
const result = await task ( ) ;
182
178
return result as T ;
183
179
}
0 commit comments