Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Focus Mode GuardNew to Visual Studio Code? Get it now.
Focus Mode Guard

Focus Mode Guard

Wasim Shaikh

| (1) | Free
Enforces focus mode with restrictions on opening files/folders, allowing dynamic overrides.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Focus Mode Guard – Multi-Select with Dynamic Override

Installs Downloads Rating Made with TypeScript

  • Download from VS Code Marketplace

Description

This Visual Studio Code extension enforces a focus mode where users can only open pre-selected files or folders. Attempting to open restricted files or folders requires user confirmation by typing the filename or folder name. If another valid file or folder is typed, it is added to the focus list automatically.

Features

  • Enable/Disable Focus Mode
  • Manage focus list with multiple entries
  • Restrict file opening with modal confirmation
  • Dynamic override to add new files/folders
  • Persistence across reloads
  • Structured logging in Output Channel

Installation

  1. Download the .vsix file from the releases or package it yourself.
  2. In VS Code, go to Extensions view (Ctrl+Shift+X), click the ... menu, and select "Install from VSIX...".
  3. Select the downloaded .vsix file.

Usage

  • Enable Focus Mode: Run command Focus Mode Guard: Enable (Ctrl+Shift+P > Focus Mode Guard: Enable) and select files/folders.
  • Disable Focus Mode: Run Focus Mode Guard: Disable.
  • Check Status: Run Focus Mode Guard: Status to see the current focus list.

Packaging the Extension

To package the extension for distribution or installation:

  1. Ensure you have Node.js installed.
  2. Install the VS Code Extension Manager globally:
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft