@@ -99,7 +99,7 @@ export class TestingDebugConfigurationFactory {
9999
100100 /* eslint-disable no-case-declarations */
101101 private buildWindowsConfig ( ) : vscode . DebugConfiguration | null {
102- if ( isDebugging ( this . testKind ) && this . testLibrary === TestLibrary . xctest ) {
102+ if ( isDebugging ( this . testKind ) ) {
103103 const testEnv = {
104104 ...swiftRuntimeEnv ( ) ,
105105 ...configuration . folder ( this . ctx . workspaceFolder ) . testEnvironmentVariables ,
@@ -114,8 +114,8 @@ export class TestingDebugConfigurationFactory {
114114
115115 return {
116116 ...this . baseConfig ,
117- program : this . xcTestOutputPath ,
118- args : this . testList ,
117+ program : this . testExecutableOutputPath ,
118+ args : this . debuggingTestExecutableArgs ,
119119 env : testEnv ,
120120 } ;
121121 } else {
@@ -403,6 +403,26 @@ export class TestingDebugConfigurationFactory {
403403 ) ;
404404 }
405405
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+
406426 private get sanitizerRuntimeEnvironment ( ) {
407427 return this . ctx . workspaceContext . toolchain . sanitizer ( configuration . sanitizer )
408428 ?. runtimeEnvironment ;
0 commit comments