Skip to content

Commit 0d3bd27

Browse files
committed
feat(vscode): connect vscode testrun to the debug session to link the lifecycle to of the session to the ui actions of the test run
1 parent 0e32e41 commit 0d3bd27

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/debugger/src/robotcode/debugger/launcher/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ async def _launch(
317317
else:
318318
sys.exit(255)
319319

320-
raise asyncio.TimeoutError("Can't connect to debugger.") from e
320+
raise asyncio.TimeoutError("Unable to connect to RobotCode debugger.") from e
321321

322322
if self._initialize_arguments is not None:
323323
await self.client.protocol.send_request_async(InitializeRequest(arguments=self._initialize_arguments))

vscode-client/testcontrollermanager.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ export class TestControllerManager {
12131213

12141214
if (included.size === 0) return;
12151215

1216-
const run = this.testController.createTestRun(request, undefined);
1216+
const testRun = this.testController.createTestRun(request, undefined);
12171217
let run_started = false;
12181218

12191219
token.onCancellationRequested(async (_) => {
@@ -1235,13 +1235,13 @@ export class TestControllerManager {
12351235
continue;
12361236

12371237
const runId = TestControllerManager.runId.next().value;
1238-
this.testRuns.set(runId, run);
1238+
this.testRuns.set(runId, testRun);
12391239

1240-
let options = {};
1240+
const options: vscode.DebugSessionOptions = {
1241+
testRun: testRun,
1242+
};
12411243
if (request.profile !== undefined && request.profile.kind !== vscode.TestRunProfileKind.Debug) {
1242-
options = {
1243-
noDebug: true,
1244-
};
1244+
options.noDebug = true;
12451245
}
12461246

12471247
let workspaceItem = this.findTestItemByUri(folder.uri.toString());
@@ -1340,7 +1340,7 @@ export class TestControllerManager {
13401340
}
13411341

13421342
if (!run_started) {
1343-
run.end();
1343+
testRun.end();
13441344
}
13451345
}
13461346

0 commit comments

Comments
 (0)