Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is my VS Code always opened with the default profile?

Is there a way to make vscode always open with a profile that I created but not the default one?

I imported the profile which I exported from my old PC, and I switch the File > Preferences > Profiles to the profile that I just imported. At first it works fine, but after I close VS Code and open it up again with a new file, my vscode just opened with the default profile and there is no extensions and all font settings, color settings...etc. I have to switch the profile after I open VS Code evey single time.

I tried to find a way to set the profile I imported as default, but I didn't find that option. And I also found that I can only delete those profiles that created or imported by me. I try to delete the default profile and only keep my own profile but it just doesn' work that way.

I also serched on google to find a way but all I can found is VS Code's official docs. And I didn't find what I want in it.

like image 887
ShuninYu Avatar asked Nov 16 '25 03:11

ShuninYu


2 Answers

You'll have to overwrite the Default profile with your new profile.

First export it as a JSON file. Then, open the exported file and Just change the value of the "name" attribute in the profile JSON to "Default", then import the profile and confirm the overwrite prompt.

Please note that this will overwrite the original Default profile. The exported file can include or exclude any aspects of your user configuration, such as keybindings or extensions. For more information, please refer to the documentation.

like image 126
omsharp Avatar answered Nov 18 '25 18:11

omsharp


I use VSC both at home, for my personal projects and learning, and at my workplace. Both run on Windows machines, but I don't think that the peculiar Operating System leads to a loss of generality: the same can be applied to other OSes, as long as they use a graphical interface with icons. The home VSC uses the Home profile, whereas the work VSC uses the Work profile.

I have resorted to this simple workaround, based on this page, to launch the correct profile.

  • When at home, the VSC icon on the desktop of my home PC will launch "D:\Program Files (x86)\Microsoft VS Code\Code.exe" --profile "Home"
  • When at work, the VSC icon on the desktop of my work laptop will launch "D:\Program Files (x86)\Microsoft VS Code\Code.exe" --profile "Work"

This way, the procedure is fully automated by the desktop icon, and I don't have to worry about manually launching the correct profile.

like image 21
Gamma Sigma Avatar answered Nov 18 '25 17:11

Gamma Sigma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!