Skip to content

Commit 39fb686

Browse files
authored
Don't append .exe to binaries ending in .xctest (#1377)
* Don't append .exe to binaries ending in .xctest Certain non standard workflows (CMake) could produce binaries that end in .xctest. Only append .exe if it doesn't already have a valid extension. Also declare `testType` in the debug configuration schema allowing users to declare what type of test framework they're using in the launch config if they're using a non standard flow. Issue: #1364
1 parent c0eba38 commit 39fb686

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,10 @@
12761276
"description": "Don't retrieve STDIN, STDOUT and STDERR as the program is running.",
12771277
"default": false
12781278
},
1279+
"testType": {
1280+
"type": "string",
1281+
"description": "If the program is a test, set this to the type of test (`XCTest` or `swift-testing`). This is typically set automatically and is only required when your launch program uses a non standard filename."
1282+
},
12791283
"shellExpandArguments": {
12801284
"type": "boolean",
12811285
"description": "Expand program arguments as a shell would without actually launching the program in a shell.",

src/debugger/debugAdapterFactory.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ export class LLDBDebugConfigurationProvider implements vscode.DebugConfiguration
125125
if (
126126
this.platform === "win32" &&
127127
launchConfig.testType === undefined &&
128-
path.extname(launchConfig.program) !== ".exe"
128+
path.extname(launchConfig.program) !== ".exe" &&
129+
path.extname(launchConfig.program) !== ".xctest"
129130
) {
130131
launchConfig.program += ".exe";
131132
}

0 commit comments

Comments
 (0)