Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non default profile settings treats some settings inconsistently when in remote setup #176280

Closed
jvillemure opened this issue Mar 6, 2023 · 4 comments
Assignees
Labels
info-needed Issue requires more information from poster user-profiles User profile management

Comments

@jvillemure
Copy link

Type: Bug

I use vscode in remote setups wsl, ssh, and devcontainer. I also use a (non-default) work settings profile when I'm at work. Common use of non default profiles would usually include customizing family of settings such as: "http.proxy", "remote.SSH", "dotfiles.", "dev.container". Right now, several of them cannot be applied to non default profiles (for instance most "remote.ssh" settings); and some other settings are applied inconsistently when in different remote setup, specifically, the setting "http.proxy" do not seem to be picked up from a non-default profile when working with a wsl or devcontainer setup, and it seems to be impossible to customize its value in any one of the settings.json files: both in remote settings.json and current profile settings the setting "http.proxy" is inactive and hovering on it displays the message "This setting has an application scope and can be set only in the user settings file.". (In both the above cases, the http.proxy setting could be customized in the default settings profile, but this kind of contradict the main uses of defining non-default settings profile: IMO the first candidate settings that benefit from this feature is http.proxy). I also use an SSH remote setup with my workplace profile settings, but the actual behavior of the http.proxy is totally different from the devcontainer and wsl cases: the http.proxy can be specified in the remote's settings.json (which is a good thing since the remote could have different network settings), but at the same time it cannot pick up the value from the non default profile setttings.json (the setting is inactive with hover message "This setting cannot be applied in this window. It will be applied when you open a local window."), nor does it read the value from the default settings profile (the setting is inactive with 2 messages: "This setting cannot be applied while a non-default profile is active. It will be applied when the default profile is active." and
"This setting cannot be applied in this window. It will be applied when you open a local window".

The only case with predicatble behavior is in non remote setup, the http.proxy setting is picked up from the currently active profile settings.json. This should be exactly what should happen in any kind of remote setup when the remote settings.json file does not overrite the http.proxy setting; also, the http.proxy should be overridable from the remote settings.json file in any remote setup.

VS Code version: Code 1.76.0 (92da948, 2023-03-01T10:22:44.506Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.15.0-58-generic

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.73GB (0.65GB free)
Process Argv --crash-reporter-id c5a1a827-bcc3-4406-8db9-b4ae3a1d12c9
Screen Reader no
VM 0%
Item Value
Remote Dev Container: milo-development-environment
OS Linux x64 5.15.90.1-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2495)
Memory (System) 7.62GB (4.87GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.90.1-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2495)
Memory (System) 7.62GB (4.87GB free)
VM 0%
Item Value
Remote Dev Container: onboard-fleet-sp-C++
OS Linux x64 5.15.90.1-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz (16 x 2495)
Memory (System) 7.62GB (4.87GB free)
VM 0%
Item Value
Remote SSH: Aragorn2
OS Linux x64 5.15.0-58-generic
CPUs Intel(R) Xeon(R) Platinum 8160 CPU @ 2.10GHz (48 x 2099)
Memory (System) 125.77GB (24.24GB free)
VM 6%
Extensions (22)
Extension Author (truncated) Version
language-x86-64-assembly 13x 3.0.0
Bookmarks ale 13.3.1
language-gas-x86 bas 0.0.2
file-icons fil 1.0.29
codespaces Git 1.13.10
remotehub Git 0.52.0
vscode-drawio hed 1.6.6
better-shellscript-syntax jef 1.4.2
vscode-boost-jam mlo 0.0.2
jupyter-keymap ms- 1.1.0
remote-containers ms- 0.283.0
remote-ssh ms- 0.99.2023030315
remote-ssh-edit ms- 0.84.0
remote-wsl ms- 0.76.1
vscode-remote-extensionpack ms- 0.24.0
azure-repos ms- 0.28.0
remote-explorer ms- 0.3.2023021509
remote-repositories ms- 0.30.0
remote-server ms- 1.1.2023022709
conanlight Son 1.4.0
vscode-icons vsc 12.2.0
azure-account ms- 0.11.3

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
azure-dev_surveyonecf:30548226
pyindex848:30662994
nodejswelcome1:30587005
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30672706
vsccsb:30677849
funwalk2cf:30676044

@sandy081
Copy link
Member

sandy081 commented Mar 8, 2023

@jvillemure It seems these settings are application scoped settings and they can be read/set only in default profile settings file. Having these settings in the profile settings file will not have any impact. Please let me know if you are seeing otherwise. It would be great if you can provide me a specific example in this case to drill down deeper.

@sandy081 sandy081 added info-needed Issue requires more information from poster user-profiles User profile management labels Mar 8, 2023
@jvillemure
Copy link
Author

jvillemure commented Mar 12, 2023

@sandy081 I think it will make things clear if I explain in details my actual use case for using settings profile. An important fact I forgot to mention is that I also use the settings sync feature, since long ago when it was released. I was a quick adopter of settings sync, I really liked the fact that I did not need to manually keep my preferences up to date between the computers I use; especially, I regularly look for and try new settings that comes with new vscode releases or extensions. This saves me a lot of manual work to sync my preferences across my few personal computers, work computer (most of it, like 90%), or other (say, a friend's) computers I would borrow for a specific task. For personal uses, I would always use exactly the same settings and extensions, and settings sync was just perfect for that. In contrast, at workplaces, it has never been the case that I could actually bring my use my own personal settings in the same way as I would at home; sometimes also, there are extensions that find some uses at work, but never at home (and vice versa). I'd expect that this duality home/work is the norm for anyone using vscode at work. There is usually a small subset of my user settings that need to be changed or set to be able to use it at workplace. To make things worst, most of this subset of settings cannot satisfy both homeplace and workplace at the same time and choosing one will imperatively 'sacrifice' the other use.

Example of settings: most things related to network, connectivity, telemetry, update settings, etc

"http.proxy*": at work, not setting this to the vpn's http proxy basically means I don't receive any upgrades, extensions upgrades, can't build containers, and loose a fair amount of functionality. Conversely, my home computer is not on my work vpn so the proxy does not resolve, so this setting needs to be unset.

"remote.SSH.*": in my previous workplace, most settings needed non default values; typically I could also never "useLocalServer": true, although this would be what I use at my home setup. Also, any 'forwarding' options needed to be turned off. In short, couldn't use most of the default I would use at home.

"dotfiles.repository": need to use corporate git at work, but at home I need my personal github.

"dev.containers.defaultExtensions": I don't use the same extensions at home, than those at work, but it doesn't support non default profiles.

"dev.containers.repositoryConfigurationPaths": anything with a path in it is subject to change from work to home (although this setting here I can specify an array with paths from both machine, but it's more a workaround).

"terminal.external.windowsExec": this one is not really important for my case: is use "wt" anywhere, but again this could potentially differ in an other workplace.

Settings sync came long before profile settings, so at that time I had to make a choice form 3 alternatives:

  1. give precedence to home settings. every workday, I would need to manually toggle comments in my settings.json to use the work settings. (for extensions, install and sync extension for both home and work)

  2. give precedence to work settings. when developing at home, I would need to manually toggle comments in my settings.json to use my personal settings; though sometimes I could have some basic uses of vscode at which do not need to toggle home/work settings. Also, before I'm done I must not forget to manually toggle back the work settings. (for extensions, install and sync extension for both home and work)

  3. stop using settings sync.

Option 1) is bad since I mostly use vscode at work. Option 2) is actually what I have been doing ever since I start using the experimental 'Settings Profile' feature not long ago. Since I mostly use work computer, and that in the end there is only a rather very small and bounded subset of incompatible settings, option 2) has been good enough for long time and I never envisaged to go back using option 3).

So I started using the settings profile feature as it was in the experimental phase, and it did solve well my use case: when hired in a new workplace (with a corporate laptop, or remote desktop), I would bring my own settings, extensions, keybindings, etc which is my default profile. Then if I needed, I create a new work profile by copying my default profile, and change the few settings that are workplace specific.

Short story is, I use the settings profile feature because I want to also use the syncing of my settings, extensions, keybindings, etc, but I also want to keep my home settings and extensions independent from my workplace (athough, they would differ in just a few settings and extensions). Additionally, my work profile would always start as a copy of my personal default profile settings, then changing few settings to accommodate the workplace peculiarities or requirements. My settings.json (and the extensions I use) is an accumulation of years of tweaking preferences and it is complete for use of any languages or tasks: I absolutely want to stick to it, and I don't have any uses for things such as 'quickly switch VS Code configurations depending on your current workflow and project' or having 2 vscode windows not using the same profiles (I'm either at work or at home); this was already solved by workspace/folder settings and language specific overrides settings, and actually the current 1.76 behaviour made things more complicated and broke the way I use profile settings (for instance: #176678, #176132).

Actually, Settings profile were much better when they were in experimental state. I'd like if we could opt to use the former behaviour (maybe have a setting for this).

@sandy081
Copy link
Member

@jvillemure Thanks a lot for using settings sync and profiles feature and also explaining your use case for both features. As you also know we have fixed #176678 already and we are discussing about what best we can do to support #176132.

Focusing on this issue, can you please let me know what else you are missing or seeing difference from old and current behaviour other than above 2 issues. I am sorry if you already said it and I missed in the previous comment?

@vscodenpa
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster user-profiles User profile management
Projects
None yet
Development

No branches or pull requests

4 participants