@@ -48,7 +48,7 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
48
48
resolveDebugConfiguration (
49
49
folder : vscode . WorkspaceFolder | undefined ,
50
50
debugConfiguration : vscode . DebugConfiguration ,
51
- token ?: vscode . CancellationToken
51
+ token ?: vscode . CancellationToken ,
52
52
) : vscode . ProviderResult < vscode . DebugConfiguration > {
53
53
return this . _resolveDebugConfiguration ( folder , debugConfiguration , token ) ;
54
54
}
@@ -57,7 +57,7 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
57
57
async _resolveDebugConfiguration (
58
58
folder : vscode . WorkspaceFolder | undefined ,
59
59
debugConfiguration : vscode . DebugConfiguration ,
60
- token ?: vscode . CancellationToken
60
+ token ?: vscode . CancellationToken ,
61
61
) : Promise < vscode . DebugConfiguration > {
62
62
if ( ! debugConfiguration . type && ! debugConfiguration . request && ! debugConfiguration . name ) {
63
63
const editor = vscode . window . activeTextEditor ;
@@ -69,7 +69,7 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
69
69
const result = await vscode . window . showQuickPick (
70
70
DEBUG_CONFIGURATIONS . map ( ( v ) => v ) ,
71
71
{ canPickMany : false } ,
72
- token
72
+ token ,
73
73
) ;
74
74
75
75
if ( result !== undefined ) {
@@ -93,7 +93,7 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
93
93
?. find (
94
94
( v ) =>
95
95
v ?. type === "robotcode" &&
96
- ( v ?. purpose === "default" || ( Array . isArray ( v ?. purpose ) && v ?. purpose ?. indexOf ( "default" ) > - 1 ) )
96
+ ( v ?. purpose === "default" || ( Array . isArray ( v ?. purpose ) && v ?. purpose ?. indexOf ( "default" ) > - 1 ) ) ,
97
97
) ?? { } ;
98
98
99
99
debugConfiguration = { ...template , ...defaultLaunchConfig , ...debugConfiguration } ;
@@ -202,11 +202,14 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
202
202
}
203
203
204
204
class RobotCodeDebugAdapterDescriptorFactory implements vscode . DebugAdapterDescriptorFactory {
205
- constructor ( private readonly pythonManager : PythonManager , private readonly outputChannel : vscode . OutputChannel ) { }
205
+ constructor (
206
+ private readonly pythonManager : PythonManager ,
207
+ private readonly outputChannel : vscode . OutputChannel ,
208
+ ) { }
206
209
207
210
async createDebugAdapterDescriptor (
208
211
session : vscode . DebugSession ,
209
- _executable : vscode . DebugAdapterExecutable | undefined
212
+ _executable : vscode . DebugAdapterExecutable | undefined ,
210
213
) : Promise < vscode . DebugAdapterDescriptor > {
211
214
const config = vscode . workspace . getConfiguration ( CONFIG_SECTION , session . workspaceFolder ) ;
212
215
@@ -250,7 +253,7 @@ class RobotCodeDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr
250
253
const port =
251
254
( await getAvailablePort (
252
255
[ host ] ,
253
- config . get ( "debugLauncher.tcpPort" , DEBUG_ADAPTER_DEFAULT_TCP_PORT ) ?? DEBUG_ADAPTER_DEFAULT_TCP_PORT
256
+ config . get ( "debugLauncher.tcpPort" , DEBUG_ADAPTER_DEFAULT_TCP_PORT ) ?? DEBUG_ADAPTER_DEFAULT_TCP_PORT ,
254
257
) ) ?? DEBUG_ADAPTER_DEFAULT_TCP_PORT ;
255
258
256
259
this . spawnDebugLauncher ( session , config , [ "debug-launch" , "--tcp" , `${ host } :${ port } ` , ...debugLauncherArgs ] ) ;
@@ -301,7 +304,7 @@ class RobotCodeDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr
301
304
private spawnDebugLauncher (
302
305
session : vscode . DebugSession ,
303
306
config : vscode . WorkspaceConfiguration ,
304
- launchArgs : string [ ]
307
+ launchArgs : string [ ] ,
305
308
) {
306
309
const pythonCommand = this . pythonManager . getPythonCommand ( session . workspaceFolder ) ;
307
310
@@ -337,7 +340,7 @@ class RobotCodeDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr
337
340
p . on ( "close" , ( code , signal ) => {
338
341
if ( code !== 0 ) {
339
342
this . outputChannel . appendLine (
340
- `debug launcher exited with code ${ code ?? "unknown" } and signal ${ signal ?? "unknown" } `
343
+ `debug launcher exited with code ${ code ?? "unknown" } and signal ${ signal ?? "unknown" } ` ,
341
344
) ;
342
345
}
343
346
} ) ;
@@ -354,30 +357,30 @@ export class DebugManager {
354
357
public readonly extensionContext : vscode . ExtensionContext ,
355
358
public readonly pythonManager : PythonManager ,
356
359
public readonly languageClientsManager : LanguageClientsManager ,
357
- public readonly outputChannel : vscode . OutputChannel
360
+ public readonly outputChannel : vscode . OutputChannel ,
358
361
) {
359
362
this . _disposables = vscode . Disposable . from (
360
363
vscode . debug . registerDebugConfigurationProvider (
361
364
"robotcode" ,
362
- new RobotCodeDebugConfigurationProvider ( this . pythonManager )
365
+ new RobotCodeDebugConfigurationProvider ( this . pythonManager ) ,
363
366
) ,
364
367
365
368
vscode . debug . registerDebugConfigurationProvider (
366
369
"robotcode" ,
367
370
{
368
371
provideDebugConfigurations (
369
372
_folder : vscode . WorkspaceFolder | undefined ,
370
- _token ?: vscode . CancellationToken
373
+ _token ?: vscode . CancellationToken ,
371
374
) : vscode . ProviderResult < vscode . DebugConfiguration [ ] > {
372
375
return DEBUG_CONFIGURATIONS . map ( ( v ) => v . body ) ;
373
376
} ,
374
377
} ,
375
- vscode . DebugConfigurationProviderTriggerKind . Dynamic
378
+ vscode . DebugConfigurationProviderTriggerKind . Dynamic ,
376
379
) ,
377
380
378
381
vscode . debug . registerDebugAdapterDescriptorFactory (
379
382
"robotcode" ,
380
- new RobotCodeDebugAdapterDescriptorFactory ( this . pythonManager , this . outputChannel )
383
+ new RobotCodeDebugAdapterDescriptorFactory ( this . pythonManager , this . outputChannel ) ,
381
384
) ,
382
385
383
386
vscode . debug . onDidReceiveDebugSessionCustomEvent ( async ( event ) => {
@@ -387,7 +390,7 @@ export class DebugManager {
387
390
await DebugManager . OnDebugpyStarted (
388
391
event . session ,
389
392
event . event ,
390
- event . body as { port : number ; addresses : undefined | string [ ] | null }
393
+ event . body as { port : number ; addresses : undefined | string [ ] | null } ,
391
394
) ;
392
395
break ;
393
396
}
@@ -406,7 +409,7 @@ export class DebugManager {
406
409
event . session ,
407
410
body . outputFile as string ,
408
411
body . logFile as string ,
409
- body . reportFile as string
412
+ body . reportFile as string ,
410
413
) ;
411
414
break ;
412
415
}
@@ -440,17 +443,17 @@ export class DebugManager {
440
443
provideEvaluatableExpression (
441
444
document : vscode . TextDocument ,
442
445
position : vscode . Position ,
443
- token : vscode . CancellationToken
446
+ token : vscode . CancellationToken ,
444
447
) : vscode . ProviderResult < vscode . EvaluatableExpression > {
445
448
return languageClientsManager . getEvaluatableExpression ( document , position , token ) . then (
446
449
( r ) => {
447
450
if ( r ) return new vscode . EvaluatableExpression ( toVsCodeRange ( r . range ) , r . expression ) ;
448
451
else return undefined ;
449
452
} ,
450
- ( _ ) => undefined
453
+ ( _ ) => undefined ,
451
454
) ;
452
455
} ,
453
- } )
456
+ } ) ,
454
457
) ;
455
458
}
456
459
@@ -468,7 +471,7 @@ export class DebugManager {
468
471
runId ?: string ,
469
472
options ?: vscode . DebugSessionOptions ,
470
473
dryRun ?: boolean ,
471
- topLevelSuiteName ?: string
474
+ topLevelSuiteName ?: string ,
472
475
) : Promise < boolean > {
473
476
const config = vscode . workspace . getConfiguration ( CONFIG_SECTION , folder ) ;
474
477
@@ -512,7 +515,7 @@ export class DebugManager {
512
515
?. find (
513
516
( v ) =>
514
517
v ?. type === "robotcode" &&
515
- ( v ?. purpose === "test" || ( Array . isArray ( v ?. purpose ) && v ?. purpose ?. indexOf ( "test" ) > - 1 ) )
518
+ ( v ?. purpose === "test" || ( Array . isArray ( v ?. purpose ) && v ?. purpose ?. indexOf ( "test" ) > - 1 ) ) ,
516
519
) ?? { } ;
517
520
518
521
if ( ! ( "target" in testLaunchConfig ) ) {
@@ -541,14 +544,14 @@ export class DebugManager {
541
544
dryRun,
542
545
} ,
543
546
} ,
544
- options
547
+ options ,
545
548
) ;
546
549
}
547
550
548
551
static async OnDebugpyStarted (
549
552
session : vscode . DebugSession ,
550
553
_event : string ,
551
- options ?: { port : number ; addresses : undefined | string [ ] | null }
554
+ options ?: { port : number ; addresses : undefined | string [ ] | null } ,
552
555
) : Promise < boolean > {
553
556
if (
554
557
session . type === "robotcode" &&
@@ -598,7 +601,7 @@ export class DebugManager {
598
601
session : vscode . DebugSession ,
599
602
_outputFile ?: string ,
600
603
logFile ?: string ,
601
- reportFile ?: string
604
+ reportFile ?: string ,
602
605
) : Promise < void > {
603
606
if ( session . configuration ?. openOutputAfterRun === "report" && reportFile ) {
604
607
await this . languageClientsManager . openUriInDocumentationView ( vscode . Uri . file ( reportFile ) ) ;
0 commit comments