@@ -99,7 +99,7 @@ export class TestingDebugConfigurationFactory {
99
99
100
100
/* eslint-disable no-case-declarations */
101
101
private buildWindowsConfig ( ) : vscode . DebugConfiguration | null {
102
- if ( isDebugging ( this . testKind ) && this . testLibrary === TestLibrary . xctest ) {
102
+ if ( isDebugging ( this . testKind ) ) {
103
103
const testEnv = {
104
104
...swiftRuntimeEnv ( ) ,
105
105
...configuration . folder ( this . ctx . workspaceFolder ) . testEnvironmentVariables ,
@@ -114,8 +114,8 @@ export class TestingDebugConfigurationFactory {
114
114
115
115
return {
116
116
...this . baseConfig ,
117
- program : this . xcTestOutputPath ,
118
- args : this . testList ,
117
+ program : this . testExecutableOutputPath ,
118
+ args : this . debuggingTestExecutableArgs ,
119
119
env : testEnv ,
120
120
} ;
121
121
} else {
@@ -403,6 +403,26 @@ export class TestingDebugConfigurationFactory {
403
403
) ;
404
404
}
405
405
406
+ private get testExecutableOutputPath ( ) : string {
407
+ switch ( this . testLibrary ) {
408
+ case TestLibrary . swiftTesting :
409
+ return this . swiftTestingOutputPath ;
410
+ case TestLibrary . xctest :
411
+ return this . xcTestOutputPath ;
412
+ }
413
+ }
414
+
415
+ private get debuggingTestExecutableArgs ( ) : string [ ] {
416
+ switch ( this . testLibrary ) {
417
+ case TestLibrary . swiftTesting :
418
+ return this . addBuildOptionsToArgs (
419
+ this . addTestsToArgs ( this . addSwiftTestingFlagsArgs ( [ ] ) )
420
+ ) ;
421
+ case TestLibrary . xctest :
422
+ return this . testList ;
423
+ }
424
+ }
425
+
406
426
private get sanitizerRuntimeEnvironment ( ) {
407
427
return this . ctx . workspaceContext . toolchain . sanitizer ( configuration . sanitizer )
408
428
?. runtimeEnvironment ;
0 commit comments