Why is proxy set in /etc/environment of VSCode devcontainer? - visual-studio-code

I created a new project and launched an Ubuntu development container.
Without any special settings, the proxy of the started environment was set in /etc/environment as follows.
vscode ➜ /workspaces/etcenv $ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
HTTPS_PROXY="http://proxy.xxx.co.jp:8080"
https_proxy="http://proxy.xxx.co.jp:8080"
NO_PROXY="localhost,127.0.0.1,169.254.169.254,169.254.170.2,xxx.co.jp"
no_proxy="localhost,127.0.0.1,169.254.169.254,169.254.170.2,xxx.co.jp"
HTTP_PROXY="http://proxy.xxx.co.jp:8080"
http_proxy="http://proxy.xxx.co.jp:8080"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
I've noticed that the addition of capitalized Proxy settings has broken some existing projects.
Earlier versions of VSCode probably didn't do this.
Is this guess correct? Is it possible to disable the setting?
The version I'm using now is:
Version: 1.73.1 (system setup)
Commit: 6261075646f055b99068d3688932416f2346dd3b
Date: 2022-11-09T04:27:29.066Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19044
Sandboxed: No
ms-vscode-remote.remote-ssh v0.92.0
An existing project was working in VSCode a couple of months ago.
I don't know if the proxy was set in /etc/environment of the existing project, but I was doing the same operation many times every day with the devcontainer, so I guess the proxy was not set.
I expected the latest version of VSCode to behave the same.
but, Existing projects, which have not changed, are now not working as they used to due to the capitalized proxy set in /etc/environment.

Related

VSCode Tensorboard (via Python extension) doesn't run in WSL2

When I work with VSCode inside WSL2 and run the Python: Launch Tensorboard command, it first asks
The package TensorBoard is required to launch a TensorBoard session. Would you like to install it?
Source: Python (Extension)
When I click Yes, it says
Could not install tensorboard. If pip is not available, please use the package manager of your choice to manually install this library into your Python environment.
But what environment is that? I can run my python scripts and notebooks without problem. I typically use Miniconda as environment manager, but I doubt this has anything to do with it.
Running tensorboard --logdir=. --host localhost --port 8888 in the console works fine, but it is a bit inconvenient.
Here is the VSCode version:
Version: 1.66.2 (user setup)
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:46:01.075Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Windows_NT x64 10.0.19043
Addendum
I now realize that everything works if I am in a regular Python file. It just doesn't work in a ipynb notebook. This seems like a minor bug - the Python extension should use the notebook's environment if no other Python environment was specified. Or is there a reason not to?
Have you tried to start tensorboard with : %tensorboard --bind_all --logdir ?
As WSL runs on a subnet (bridge), you may need to listen on all IPs .
This solved the problem on my side :-)

Extension Host Terminated Unexpectedly (vs code) Mac

I have been struggling with this vs code issue (extension host terminated unexpectedly).
I've tried uninstalling/ reinstalling vs code, I've uninstalled and disabled all my extensions and still get the error, I've downloaded an older version which worked temporarily, I'm out of ideas.
I don't understand how I can have no extensions but the still get the error?
does anybody know the answer to this?
it seems I'm having the same issue as your from around the same time. I would suggest to add more infos, in my case for example
> MacOS X : 10.11.6 El Capitan
> VS Code Version: 1.57.1
> Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
> Date: 2021-06-17T13:28:32.912Z
> Electron: 12.0.7
> Chrome: 89.0.4389.128
> Node.js: 14.16.0
> V8: 8.9.255.25-electron.0
> OS: Darwin x64 15.6.0
After a long period of not using VS Code I found this alert always popping up
-Extension host terminated unexpectedly
-Open Developer Tools -Restart Extension Host
And restarting just repeated this alert.
If I choose from the context menu (aka right click) Run a line/selection or Run Current File, either on terminal or in interactive window with Jupyter, it has no reaction (while a couple of days ago it worked perfectly, when I used it in offline cause there was no wifi)
In hope it could help you, here are what I tried:
to deactivate and reactivate the extension (cmd+shift+p > Reload With
Extensions disabled)
to install a previous extension of Python ms-python.python (or whatever suit your case)
to run the command Bisect (cmd+shift+p > Help: Start Extension
Bisect)
So far I found no solution for me.
Soon I will try to follow what sumitparakh commented in this github issue , meaning to save the former extensionHostProcess.js file (renaming it) and adding in its stead the file he provided
On Windows the location should be
C:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js
While MacOS path should be:
'/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js'
UPDATE 1: after adding the file and reloading I get even this message
-Your Code installation appears to be corrupt. Please Reinstall
-More information
UPDATE 2: I tried to follow this fix from a github issue . Here is the quote:
ehamwey commented on Jan 4
The following steps worked for me, after upgrading from an x86 build
of vscode-insiders to Darwin arm64 (version 1.53.0-insider) I got the
behavior described above.
Remove the folder: /Users/[your-home-folder]/.vscode/ # **NOTE:** I renamed it as a backup
This will remove all extensions and any vscode configurations from your system!
Reinstall vscode and any extensions
BUT, even after I reinstalled the same version 1.57.1 of Code the extension host error is there, without any extension yet installed...
So maybe, I should try to revert to a previous update and maybe even reporting this issue
I'm open to suggestion aswell
I solved it running in the notebook kernel:
pip install six

Vscode - How using %APPDATA% in settings.json?

edit - nov 2022 - I didn't need this anymore, I've switched to Linux & Docker, no more coding under Windows
Does someone knows how to refer to my APPDATA folder in my vscode settings.json file?
I'm trying to set the path to my php-cs-fixer like below so, on all my development computer, the path can be retrieved.
"php-cs-fixer.executablePathWindows": "$env:APPDATA/Composer/vendor/bin/php-cs-fixer.bat",
To be clear: $env:APPDATA seems to be unsupported.
I'm using the latest version of vscode.
Version: 1.52.1 (user setup)
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:34:46.910Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
I tried this on VSCode Insiders 1.53, was able to set using ~:
{
"php-cs-fixer.executablePathWindows": "~\\AppData\\Roaming\\Composer\\vendor\\bin\\php-cs-fixer.bat"
}
Seems that the ~ is transformed to match C:\Users\[you].
I know for sure that ${env:APPDATA} works because I use it in the setting : "emmet.extensionsPath": "${env:APPDATA}\\Code\\User\\Emmet Settings",
Check this documentation section. Unfortunately, this issue complains that it is not supported in every settings and extensions. I strongly suggest that every one upvote this issue so we have better chance MS takes care of it.

VSCode: 3 dots popping up and disappearing in editor

I have VSCode installed with
Version: 1.52.0-insider (user setup)
Commit: 0a80aacc7be1ab03ec0f94b8ac1a84949a83f35d
Date: 2020-11-26T07:36:22.965Z
Electron: 11.0.2
Chrome: 87.0.4280.63
Node.js: 12.18.3
V8: 8.7.220.24-electron.0
OS: Windows_NT x64 10.0.19042
I also installed C/C++ for Visual Studio Code 1.1.2.
Then created some hpp file.
Also when hitting enter on some random line, 3 dots appear on some strange empty lines.
After 2 seconds these dots and lines disappear again.
This makes working in the editor really hard when lines come and go.
Here is a screenshot:
Any idea how to disable these popping up dots?
This was happening to me because of the GitLens extension. I uninstalled it and now the issue is gone. It seems they have open issues for this issue but they are not addressed (as of today)
https://github.com/microsoft/vscode/issues/111472
https://github.com/gitkraken/vscode-gitlens/issues/1312

What did I break, VS Code now complains about Readme markdown generated by Azure Devops

Not sure what I did, but I mist have broke something. I was using the MSSQL extension to query sql and the next thing I know Im getting complaints about a readme file I added when I setup the repo for my project. dotnet build still succeeds, but I dont recall seeing these messages when I first started the project, nor the red squiggles in the file itself.
Version: 1.39.1 (system setup)
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17134