Yahoo
Skip to main content
Advertisement
Advertisement
Advertisement
Advertisement

I thought I knew VS Code, but these 5 features proved me wrong

Visual Studio Code logo
Corbin Davenport / How-To Geek / Microsoft

For years, Visual Studio Code has felt like that default choice, especially because it saves you time every day . It's the ubiquitous, open-source workhorse that handles everything from simple Markdown files to massive TypeScript projects. Most of us settle into a comfortable rhythm and assume we've mastered the tool. However, the VS Code team is constantly pushing the boundaries, subtly injecting features that improve the workflow. The reality is, even if you use VS Code every day, you are likely to miss out on many features. We will point out functionality you may have missed through the many updates over time.

Sticky scroll

A much easier way to read things

Renaming a variable in VS Code using the F2 shortcut.

Navigating huge files can feel like a headache until you turn on Sticky Scroll. Instead of getting lost in a bunch of nested loops or venturing hundreds of lines deep into a class, this feature pins your class, function, and interface signatures right to the top of your editor as you scroll. Pair this with some extensions you can't live without , and you're set.

You'll always know exactly which scope you're in without having to navigate all the way back up to check. It acts like a dynamic anchor, seamlessly supporting many different file formats, from C#, C++, and JavaScript to structured formats like JSON, YAML, HTML, and Markdown. When you're deep inside a complex code block and need to quickly jump back to the beginning of a function or class declaration, you can just click on the sticky header line. Visual Studio Code instantly moves your cursor back to that exact indentation level, getting rid of all that manual movement.

Advertisement
Advertisement

If you find that deeply nested code is taking up too much of your editor's vertical space, you can adjust it from the default of five rows all the way up to twenty using the editor.stickyScroll.maxLineCount setting.

Built-in local history

No need to worry if you click out

In the past, closing an editor meant permanently losing your undo stack, leaving you with no simple way to revert to a previous state using standard keyboard shortcuts. However, VS Code's built-in Local History operates entirely independently of Git or any other source control system. This feature automatically creates and maintains file snapshots in the background as you work. It provides a reliable safety net for your local edits without requiring manual commits.

When you open the Timeline view, you can see every saved version of your file chronologically interleaved with your Git commits. When you save an editor, a new entry is automatically added to this list. When you select an entry from this timeline, VS Code opens a side-by-side diff editor. Things like this, paired with the smart features that get added in every so often make it hard to leave it.

It's remarkably adept at resurrecting completely removed work that was never tracked by Git. If you accidentally delete one, you can bring up the Command Palette and search for the "Local History: Find Entry to Restore" command. After typing the name of your deleted files, VS Code will present a list of all available historical snapshots for that document.

Zen mode

When you are completely in the zone

An integrated developer environment and the VS Code logo in the center.

When your terminal, explorer pane, minimap, activity bar, and source control tabs are all asking for your attention, it's tough to really focus on coding. Pressing Ctrl+K then Z (or Cmd+K Z on Mac) turns on Zen Mode. This immediately removes the entire user interface, makes your code full-screen, and centers it on your monitor.

Advertisement
Advertisement

It's the best distraction-free setting that makes you concentrate only on the logic right in front of you. By default, Zen Mode actively gets rid of all visual clutter, including the status bar, line numbers, tabs, and even notifications that aren't errors, making sure your flow state stays completely undisturbed. However, the really amazing part is how much you can customize this environment.

Hovering your mouse over the left or right edges of the centered text area, hidden handles appear that let you change the size of your coding workspace dynamically to perfectly match what you like to see. Also, if you go to your Visual Studio Code settings and search for "Zen Mode," you'll find many detailed controls to decide exactly what disappears.

Dev containers

It's always a good time for containers

Setting up your local environments with the correct Node versions, databases, and system dependencies can take you hours before you even write a single line of code. The Dev Containers extension lets you open any folder inside a Docker container and use it as a full-featured, localized development environment.

VS Code handles all the heavy lifting in the background, meaning you'll get a configured, completely isolated workspace every single time, without installing any messy dependencies directly onto your local machine. At the heart of this feature is the devcontainer.json file, which essentially turns a complex setup guide into code.

Advertisement
Advertisement

This configuration file tells VS Code exactly how it should launch the container (which base Docker image or Dockerfile to use, and what post-creation commands to execute). It lets you define your whole development environment as code, creating a reproducible setup that works the same way whether you're on Windows, macOS, or Linux. You can even set up the file to automatically install your favorite VS Code extensions right into the container, so your coding environment is immediately ready the moment the workspace starts.

Logpoints

A customized message to make things easier

Screenshot of the Visual Studio Code Remote SSH extension

If your code is regularly filled with console.log or print statements that you constantly add, search for, and remove, Logpoints will completely change how you work. Instead of pausing execution like a traditional breakpoint or changing your actual code, a Logpoint simply prints a customized message to the debug console when that line is hit. It's the ideal way to inspect variables and track execution on the fly without ever touching your source file or risking committing leftover debug statements.

One of the best aspects of using Logpoints is how they maintain the clean state of your codebase. Because these logging statements are injected at execution time by the debugger and exist entirely within your IDE, they are never saved in your source files. You can completely give up the tiresome task of cleaning your codebase for temporary debug prints before making a Git commit.


Visual Studio keeps getting better

You might have felt like you had mastered VS Code, but the incremental updates provided by the development team keep adding more to learn. If you've stuck to the basics, you've been using VS Code for survival. By using these advanced tools, you can be far more productive and efficient. The IDE is designed to remove friction, letting you concentrate on the logic you're writing rather than the tooling around it. Take the time to understand these hidden features and any that pop up over time, and you'll find that the app gets better every year.

Advertisement
Advertisement
Mobilize your Website
View Site in Mobile | Classic
Share by: