@@ -313,7 +313,7 @@ export default class TestManager extends AbstractProvider {
313313 }
314314 }
315315
316- private _createLaunchConfiguration ( program : string , args : string , cwd : string , debuggerEventsPipeName : string ) {
316+ private _createLaunchConfiguration ( program : string , args : string , cwd : string , environmentVariables : Map < string , string > , debuggerEventsPipeName : string ) {
317317 let debugOptions = vscode . workspace . getConfiguration ( 'csharp' ) . get ( 'unitTestDebuggingOptions' ) ;
318318
319319 // Get the initial set of options from the workspace setting
@@ -333,7 +333,8 @@ export default class TestManager extends AbstractProvider {
333333 debuggerEventsPipeName : debuggerEventsPipeName ,
334334 program : program ,
335335 args : args ,
336- cwd : cwd
336+ cwd : cwd ,
337+ env : environmentVariables ,
337338 } ;
338339
339340 // Now fill in the rest of the options
@@ -369,6 +370,7 @@ export default class TestManager extends AbstractProvider {
369370 response . FileName ,
370371 response . Arguments ,
371372 response . WorkingDirectory ,
373+ response . EnvironmentVariables ,
372374 debugEventListener . pipePath ( ) ) ;
373375 }
374376 finally {
@@ -497,7 +499,7 @@ export default class TestManager extends AbstractProvider {
497499
498500 try {
499501 let response = await serverUtils . debugTestClassGetStartInfo ( this . _server , request ) ;
500- return this . _createLaunchConfiguration ( response . FileName , response . Arguments , response . WorkingDirectory , debugEventListener . pipePath ( ) ) ;
502+ return this . _createLaunchConfiguration ( response . FileName , response . Arguments , response . WorkingDirectory , response . EnvironmentVariables , debugEventListener . pipePath ( ) ) ;
501503 }
502504 finally {
503505 listener . dispose ( ) ;
@@ -537,7 +539,7 @@ export default class TestManager extends AbstractProvider {
537539 return null ;
538540 }
539541
540- return this . _createLaunchConfiguration ( response . FileName , response . Arguments , response . WorkingDirectory , debugEventListener . pipePath ( ) ) ;
542+ return this . _createLaunchConfiguration ( response . FileName , response . Arguments , response . WorkingDirectory , response . EnvironmentVariables , debugEventListener . pipePath ( ) ) ;
541543 }
542544 finally {
543545 listener . dispose ( ) ;
0 commit comments