Skip to main content
  1. Posts/

Optimizing VSCode Startup Time with Profiles

·809 words·4 mins
Chris Ayers
Author
Chris Ayers
I am a father, nerd, gamer, and speaker.

Visual Studio Code (VS Code) is a popular code editor that offers a wide range of extensions to enhance its functionality. However, having too many extensions installed can increase the startup time of the editor, which can be very annoying. In this blog post, we’ll explore how to optimize the startup time of VS Code by using profiles, a feature introduced in VS Code earlier this year.

vscode logo

What are VS Code Profiles?
#

In Visual Studio Code (VS Code), profiles are a feature that allows users to create sets of customizations for the editor. VS Code has a vast array of settings, thousands of extensions, and numerous ways to adjust the user interface layout in order to personalize the editor according to the user’s preferences. With VS Code Profiles, users can create and save different sets of customizations, and then quickly switch between them as needed. Additionally, users can share their profiles with others, making it easier to collaborate with a consistent development environment

Why Use Profiles?
#

VS Code Profiles can be used for various purposes, including the following:

  • Optimizing Multiple Work Scenarios: Users juggling diverse projects ranging from work assignments to personal open-source contributions and side gigs can leverage VS Code Profiles. These profiles permit the creation and swapping of distinct configurations, each tailored to meet the unique requirements of different tasks.

  • Facilitating Collaborative Coding: Profiles can standardize the coding environment across a team, mitigating configuration discrepancies and ensuring everyone works with the same set of tools.

  • Streamlining Training and Onboarding: Organizations can expedite the setup process for new hires or trainees by creating VS Code Profiles equipped with the requisite tools and configurations.

  • Managing Visual Preferences: For users fond of alternating between themes or appearances based on tasks or time, profiles can ease this transition.

  • Tailoring Language-Specific Environments: Developers dealing with multiple programming languages can create a profile for each, complete with relevant extensions, linters, and settings, promoting a more fluid workflow.

  • Supporting Learning of New Technologies: When embarking on learning a new technology or language, users can set up a separate profile equipped with all necessary tools and configurations, thereby fostering a more focused learning environment.

  • Enriching Educational Experiences: Profiles allow educators to craft VS Code setups, replete with specific extensions and settings suitable for particular classes such as computer science. Students can then access these custom setups, aiding in a more effective learning process.

Overall, VS Code Profiles provide a convenient way to manage and switch between different sets of customizations, ensuring that users have the optimal development environment for their current task or project.

Tips for Organizing Profiles
#

  • Keep a “Default” Profile: You may want to have a “default” profile with commonly used extensions that you find useful across all projects. This profile can serve as your go-to for general development tasks. Mine has my common font and color settings, as well as extensions like Dev Containers, Live Share, and GitHub Copilot.

  • Name Profiles Descriptively: Choose descriptive names for your profiles to make it easier to remember what each profile is intended for. For example, “Web Dev,” “Python,” or “Markdown Editing.”

  • Create Task-Specific Profiles: Consider creating profiles for specific tasks, such as web development, Python development, or Markdown editing. Include only the extensions relevant to each task in their respective profiles.

ProfileExtensions and Settings
.NET DevelopmentC# Extension, NuGet Package Manager GUI, REST Client
Azure DevelopmentAzure Extensions, AZ CLI, Azure Terraform, ARM Visualizer
Python DevelopmentPython Extension, Pylance, Jupyter, Azure Functions
Markdown EditingMarkdown All in One, Markdown Preview Enhanced, Markdownlint

How to Create and Use Profiles
#

To create a new profile in VS Code, you can use two different methods.

  1. Via the Settings Menu you can create, delete, export, and import profiles

  2. Via the Command Palette, follow these steps:

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and search for the “Profile:” command.
  2. You can create, delete, export, and more from here.

To switch between profiles, use the “Profile: Switch Profile” command from the Manage menu or Command Palette and select the desired profile. This will activate the selected profile and reload the editor with the specified extensions and settings.

Suggestions
#

In my experience, creating a profile from scratch tends to reset various elements such as themes, custom fonts, and other personalized settings. As a workaround, I typically maintain my Default profile with my preferred configurations. When I need a new profile, I simply clone the Default one and then tailor it to my specific needs.

Conclusion
#

By using profiles in VS Code, you can optimize the startup time of your editor and ensure that only the necessary extensions are activated for each project or task. This not only improves performance but also helps you stay organized and focused on the task at hand. Give profiles a try, and experience a more streamlined coding environment!

Related

Marp - Create Presentations with Markdown

·1020 words·5 mins
This is part 1 of the MARP series. You can read the series of articles here: Marp - Create Presentations with Markdown Unleash Your Creativity with Marp Presentation Customization Introduction # Marp is a powerful and user-friendly presentation framework that simplifies the process of creating visually appealing slide decks using Markdown. In this blog post, we’ll explore what Marp is, why you might want to use it, how to get started. I’ll share my process and show you how you can automate hosting your presentations on GitHub Pages using GitHub Actions.

Secure Terraform - Part 4 - checkov

This is part 4 of the Secure Terraform series. You can read the series of articles here: Secure Terraform - Part 1 - tfsec Secure Terraform - Part 2 - tfsec customization Secure Terraform - Part 3 - terrascan Secure Terraform - Part 4 - checkov Secure Terraform - Part 5 - terraform state Introduction # In this fourth installment of our Secure Terraform series, we’ll discuss Checkov, a powerful open-source static code analysis tool supported by Bridgecrew. Checkov supports Terraform, Kubernetes, Dockerfiles, AWS CloudFormation, and other Infrastructure as Code (IaC) frameworks. It focuses on security best practices, policy compliance, and industry standards. You can find Checkov’s documentation and samples at https://www.checkov.io/.

Secure Terraform - Part 3 - terrascan

This is part 3 of the Secure Terraform series. You can read the series of articles here: Secure Terraform - Part 1 - tfsec Secure Terraform - Part 2 - tfsec customization Secure Terraform - Part 3 - terrascan Secure Terraform - Part 4 - checkov Secure Terraform - Part 5 - terraform state Introduction # Terrascan is another great tool for terraform security from tenable.

Secure Terraform - Part 2 - tfsec Customization

·1215 words·6 mins
This is part 2 of the Secure Terraform series. You can read the series of articles here: Secure Terraform - Part 1 - tfsec Secure Terraform - Part 2 - tfsec customization Secure Terraform - Part 3 - terrascan Secure Terraform - Part 4 - checkov Secure Terraform - Part 5 - terraform state Introduction # In the previous article, we discussed tfsec, a static code analysis tool for Terraform. We also learned how to use it in VSCode and GitHub Actions to scan our Terraform code. We learned how to override the severity of rules. In this article, we will learn how to customize the rules and add our own rules.

Secure Terraform - Part 1 - tfsec

This blog was posted as part of the Festive Tech Calendar 2022. I really want to thank the organizers for helping set this up! Gregor Suttie Richard Hooper Keith Atherton Simon Lee Lisa Hoving Look for the hashtag #FestiveTechCalendar2022 on social media! Make sure to check out everyone else’s work when you’re done here This is part 1 of the Secure Terraform series. You can read the series of articles here: