How to Restore or Hide the Menu Bar in Visual Studio Code

avatar
Borislav Hadzhiev

Last updated: Apr 6, 2024
3 min

banner

# How to Restore or Hide the Menu Bar in Visual Studio Code

The easiest way to restore the Menu bar in VS Code is to do it in your settings.

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings and select Preferences: Open User Settings.

open user settings

You can also open the settings screen by pressing Ctrl + , on Windows and Linux or Cmd + , on macOS.

  1. Type menu bar visibility.

search menu bar visibility

  1. Set the Window: Menu Bar Visibility setting to classic.

The setting controls the visibility of the menu bar.

It has 5 possible values:

  • classic - The menu bar is displayed at the top of the window and only hidden in full-screen mode.
  • visible - The menu is always visible at the top of the window, even in full-screen mode.
  • toggle - The menu is hidden but can be displayed by pressing the Alt key.
  • hidden - The menu is always hidden.
  • compact - The menu is displayed as a burger button in the sidebar.

compact setting

If you want to hide the menu bar, then toggle is the value you should pick.

You can then press Alt to show the menu bar if necessary.

# Try pressing the Alt key

If your Window: Menu Bar Visibility is set to toggle, you have to press the Alt key to show or hide it.

Pressing the Alt key toggles the visibility of the Menu bar.

# Make sure you haven't entered Full-screen mode by mistake

Make sure you haven't entered full-screen mode by mistake.

On Windows and Linux, use the F11 key to toggle full-screen mode.

On macOS, use Ctrl + Cmd + F or ⌃ ⌘ F.

If you need to show the menu bar even in full-screen mode, you have to set the Window: Menu Bar Visibility property to visible as shown in the previous subheading.

# Restoring the Menu bar via the Command Palette

You can also use the command palette.

  1. Press:
  • Ctrl + Shift + P on Windows and Linux.
  • Command + Shift + P on macOS.
Note: you can also press F1 to open the Command Palette.
  1. Type toggle menu and select View: Toggle Menu Bar.

toggle menu bar

When you toggle the menu bar, it might get set to compact mode and moved to the top of the sidebar.

Here is a short clip that demonstrates the process.

toggle menu bar using command palette

If the menu gets set to compact mode and moved to the top of the sidebar, you can either toggle it again via the command palette or hide it.

You can hide it by right-clicking on the burger menu icon and selecting Hide Menu.

right click hide menu

You can then press Alt to toggle the menu or use the command palette.

# Restoring the menu bar visibility in your settings.json file

You can also set the window.menuBarVisibility property in your settings.json file to achieve the same result.

  1. Press Ctrl + Shift + P (or Command + Shift + P on macOS).
Note: you can also press F1 to open the Command Palette.
  1. Type user settings json.

  2. Click on Preferences: Open User Settings (JSON)

preferences open user settings

  1. Paste the following line into your settings.json file.
settings.json
"window.menuBarVisibility": "classic",

Make sure to remove the trailing comma if the property comes last.

restore menu bar in settings json

I wrote a book in which I share everything I know about how to become a better, more efficient programmer.
book cover
You can use the search field on my Home Page to filter through all of my articles.