1
1
import * as net from "net" ;
2
2
import * as path from "path" ;
3
- import * as fs from "fs" ;
4
3
import * as vscode from "vscode" ;
5
4
import { LanguageClient , LanguageClientOptions , ServerOptions } from "vscode-languageclient/node" ;
6
5
import { sleep } from "./utils" ;
@@ -316,6 +315,8 @@ async function getCurrentTestFromActiveResource(
316
315
} ) ) ?? undefined
317
316
) ;
318
317
} catch { }
318
+
319
+ return ;
319
320
}
320
321
321
322
interface Test {
@@ -448,7 +449,7 @@ async function onRobotExited(session: vscode.DebugSession, outputFile?: string,
448
449
case "disabled" :
449
450
return ;
450
451
case "external" :
451
- vscode . env . openExternal ( vscode . Uri . file ( reportFile ) ) ;
452
+ vscode . env . openExternal ( vscode . Uri . file ( reportFile ) ) ;
452
453
}
453
454
}
454
455
}
@@ -496,7 +497,7 @@ export async function activateAsync(context: vscode.ExtensionContext) {
496
497
let res = resource ?? vscode . window . activeTextEditor ?. document . uri ;
497
498
498
499
let realTest =
499
- ( test !== undefined && test instanceof String ? test . toString ( ) : undefined ) ??
500
+ ( test !== undefined && typeof test === "string" ? test . toString ( ) : undefined ) ??
500
501
( await getTestFromResource ( res ) ) ;
501
502
if ( ! realTest ) return ;
502
503
@@ -512,7 +513,7 @@ export async function activateAsync(context: vscode.ExtensionContext) {
512
513
let res = resource ?? vscode . window . activeTextEditor ?. document . uri ;
513
514
514
515
let realTest =
515
- ( test !== undefined && test instanceof String ? test . toString ( ) : undefined ) ??
516
+ ( test !== undefined && typeof test === "string" ? test . toString ( ) : undefined ) ??
516
517
( await getTestFromResource ( res ) ) ;
517
518
if ( ! realTest ) return ;
518
519
@@ -600,12 +601,6 @@ export async function activateAsync(context: vscode.ExtensionContext) {
600
601
} ,
601
602
} ) ,
602
603
603
- // vscode.debug.onDidStartDebugSession(async (session) => {
604
- // if (session.configuration.type === "robotcode") {
605
- // await attachPython(session);
606
- // }
607
- // })
608
-
609
604
vscode . workspace . onDidChangeConfiguration ( ( event ) => {
610
605
for ( let s of [
611
606
"python.pythonPath" ,
@@ -649,7 +644,11 @@ export async function activateAsync(context: vscode.ExtensionContext) {
649
644
) : vscode . ProviderResult < vscode . InlineValue [ ] > {
650
645
const allValues : vscode . InlineValue [ ] = [ ] ;
651
646
652
- for ( let l = 0 ; l <= context . stoppedLocation . end . line ; l ++ ) {
647
+ for (
648
+ let l = viewPort . start . line ;
649
+ l <= Math . min ( viewPort . end . line , context . stoppedLocation . end . line ) ;
650
+ l ++
651
+ ) {
653
652
const line = document . lineAt ( l ) ;
654
653
let text = line . text . split ( "#" ) [ 0 ] ;
655
654
0 commit comments