@@ -104,7 +104,11 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
104
104
...( debugConfiguration . robotPythonPath ?? [ ] ) ,
105
105
] ;
106
106
107
- debugConfiguration . args = [ ...config . get < string [ ] > ( "robot.args" , [ ] ) , ...( debugConfiguration . args ?? [ ] ) ] ;
107
+ debugConfiguration . args = [
108
+ ...config . get < string [ ] > ( "robot.args" , [ ] ) ,
109
+ ...( Array . isArray ( defaultLaunchConfig ?. args ) ? defaultLaunchConfig . args : [ ] ) ,
110
+ ...( debugConfiguration . args ?? [ ] ) ,
111
+ ] ;
108
112
109
113
debugConfiguration . variableFiles = [
110
114
...config . get < string [ ] > ( "robot.variableFiles" , [ ] ) ,
@@ -368,7 +372,7 @@ export class DebugManager {
368
372
args . push ( `robotcode.debugger.modifiers.ExcludedByLongName${ separator } ${ excluded . join ( separator ) } ` ) ;
369
373
}
370
374
371
- const testLaunchConfig =
375
+ const testLaunchConfig : { [ Key : string ] : unknown } =
372
376
vscode . workspace
373
377
. getConfiguration ( "launch" , folder )
374
378
?. get < { [ Key : string ] : unknown } [ ] > ( "configurations" )
@@ -382,7 +386,7 @@ export class DebugManager {
382
386
testLaunchConfig . target = "" ;
383
387
}
384
388
385
- const paths = config . get ( "robot.paths" , [ ] ) ;
389
+ const paths = config . get < Array < string > > ( "robot.paths" , [ ] ) ;
386
390
387
391
return vscode . debug . startDebugging (
388
392
folder ,
@@ -393,9 +397,12 @@ export class DebugManager {
393
397
name : "RobotCode: Run Tests" ,
394
398
request : "launch" ,
395
399
cwd : folder ?. uri . fsPath ,
396
- paths : paths ,
397
- args : args ,
398
- console : config . get ( "debug.defaultConsole" , "integratedTerminal" ) ,
400
+ paths : "paths" in testLaunchConfig ? [ ...( testLaunchConfig . paths as Array < string > ) , ...paths ] : paths ,
401
+ args : "args" in testLaunchConfig ? [ ...( testLaunchConfig . args as Array < string > ) , ...args ] : args ,
402
+ console :
403
+ "console" in testLaunchConfig
404
+ ? testLaunchConfig . console
405
+ : config . get ( "debug.defaultConsole" , "integratedTerminal" ) ,
399
406
runId : runId ,
400
407
dryRun,
401
408
} ,
0 commit comments