Debug Test can't receive `DYLD_LIBRARY_PATH` variable in macOS.
See original GitHub issueIssue Description
I set the DYLD_LIBRARY_PATH
in the zshrc, then run dotnet test print the env variable value. but when I use debug Test , It can not get the variable value.
I record a video:
- I have not set the
CUSTOM_VAR
in the zshrc, then run the dotnet test, It’s can print theDYLD_LIBRARY_PATH
variable value. - I set the
CUSTOM_VAR
in the zshrc, then restart the vscode and clickDebut Test
, Now in terminal we can see theCUSTOM_VAR
variable, butDYLD_LIBRARY_PATH
is null. - use dotnet test, I can get both environment variable value.
Steps to Reproduce
- write the
export DYLD_LIBRARY_PATH="xxx"
in the~/.zshrc
- restart the viscose
- click the debug test with code:
[Fact]
public void TestGETENV()
{
// var env = System.Environment.GetEnvironmentVariables();
// foreach (var k in env.Keys)
// {
// System.Console.WriteLine(k + ": " + env[k]);
// }
System.Console.WriteLine("Get DYLD_LIBRARY_PATH : " + System.Environment.GetEnvironmentVariable("DYLD_LIBRARY_PATH"));
System.Console.WriteLine("Get CUSTOM_VAR : " + System.Environment.GetEnvironmentVariable("CUSTOM_VAR"));
}
Expected Behavior
will print the Get DYLD_LIBRARY_PATH : xxx
Actual Behavior
Get DYLD_LIBRARY_PATH :
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.65.2 C# Extension: 1.24.1
Mono Information
OmniSharp using built-in monoDotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.201 Commit: ef40e6aa06Runtime Environment: OS Name: Mac OS X OS Version: 12.3 OS Platform: Darwin RID: osx.12-arm64 Base Path: /usr/local/share/dotnet/sdk/6.0.201/
Host (useful for support): Version: 6.0.3 Commit: c24d9a9c91
.NET SDKs installed: 6.0.201 [/usr/local/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions
Extension | Author | Version |
---|---|---|
better-comments | aaron-bond | 2.1.0 |
change-case | wmaurer | 1.0.0 |
clang-format | xaver | 1.9.0 |
codestream | CodeStream | 12.13.0 |
copilot | GitHub | 1.9.5350 |
csharp | ms-dotnettools | 1.24.1 |
doxdocgen | cschlosser | 1.4.0 |
file-icons | file-icons | 1.0.29 |
gitlens | eamodio | 12.0.5 |
hexeditor | ms-vscode | 1.9.5 |
icons-carbon | antfu | 0.2.4 |
increment-selection | albymor | 0.2.0 |
material-theme | zhuangtongfa | 3.13.20 |
remote-ssh | ms-vscode-remote | 0.76.1 |
remote-ssh-edit | ms-vscode-remote | 0.76.1 |
test-adapter-converter | ms-vscode | 0.1.5 |
todo-tree | Gruntfuggly | 0.0.215 |
vscode-clangd | llvm-vs-code-extensions | 0.1.15 |
vscode-lldb | vadimcn | 1.7.0 |
vscode-test-explorer | hbenl | 2.21.1 |
vscode-wakatime | WakaTime | 18.0.8 |
vscode-yaml | redhat | 1.5.1 |
vscodeintellicode | VisualStudioExptTeam | 1.2.17 |
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top GitHub Comments
@zhen8838 I had hard time not including it in the release, so I just included it. The artifacts are now being uploaded. And there should be new version available soon, with this fix, 1.24.2.
@nohwnd Thank you very much for your help! 👍