Open weinand opened 7 years ago
From @galvesribeiro on June 8, 2017 18:37
As an extra note, if you run the project on OSX using dotnet run
(no IDE involved) the application run properly... In other words, the problem only happen while running from VSCode.
.Net Core functionality is not a built-in feature of VS Code but comes through an extension. As a courtesy I will move this issue to the correct repository.
@galvesribeiro: To clarify, are you seeing this when running under the debugger?
@DustinCampbell yep, I do.
Like I said, VS for Mac (debugging) and just dotnet run
don't fall in the problem. Only when debugging on VSCode...
Thanks! I just wanted to figure out who to ping. :smile:
cc @gregg-miskelly, @caslan
@galvesribeiro try this:
cd
to the directory of your cwd
property in your launch.jsondotnet <path-to-your-app-dll>
Do you see the problem?
"cwd": "${workspaceRoot}"
And no, the problem doesn't happen...
Do you see the problem with 'Debug->Start Without Debugging (Ctrl-F5)' from VS Code?
Yes, I tried that as well and the exception happens.
The only theory I can think of is there is some sort of security or environment context that is flowing from the fact that your app is now a child process of VS Code instead of Terminal.
Do you see the same problem if you use the VS Code integrated terminal? If not, how about if you configure a task.json task which launhes your app?
VS Code tries to propagate the environment variables to the debug adapter or the integrated terminal.
You could try to run the program in VS Code's integrated terminal and see whether this makes a difference.
Hum... I'll try to do that with the terminal and report back as soon as I got to my PC.
From @galvesribeiro on June 8, 2017 18:13
When making an HTTP request using Azure SDK in a given application, it throw:
I've reach Azure SDK team and we had debuged it (original issue here https://github.com/Azure/azure-sdk-for-net/issues/3312).
The problem only happen if the application is running on VSCode. If I run using VS for Mac, it works flawless.
That initially led us to think that VSCode was using some different dotnet SDK version than the one installed into the system. I removed completely dotnet SDK and VSCode (including any related hidden folder from $HOME) and the behavior still there.
Can someone point me to the right direction?
PS: For MSFT buddies, that is happening in an internal project so if you need more details and code sample, ping me on Skype for Business and we can talk offline.
Thank you, Gutemberg
Copied from original issue: Microsoft/vscode#28250