[Bug] EBUSY: resource busy or locked - Cannot save .cpp file on Windows 11

Open
#320,708 0 comments 0 reactions 1 assignee View on GitHub

@hediet is already working on this.

Since Jun 10, 2026.

Assessment

This issue has not been assessed yet.

Description

stale triage-needed

VS Code cannot save a file that is only open in VS Code itself.
Error: "Failed to save 'main.cpp': Unable to write file - EBUSY: resource busy or locked"

Steps to reproduce:

  1. Open a .cpp file in VS Code on Windows 11
  2. Edit the file
  3. Press Ctrl+S to save

Expected: File saves normally
Actual: EBUSY error appears, file cannot be saved even though no other process is using it

Environment:

  • OS: Windows 11
  • Editor: VS Code
  • File type: .cpp (C++ source file)
Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.