microsoft / microsoft/vscode

Wokwi custom editor fails to load in specific workspace due to corrupted VS Code metadata; ATP recovery + Windows Defender non‑prompt + Copilot credit warnings created cross‑linked failures

Open
#325,508 0 comments 0 reactions 1 assignee Claimed by @ulugbekna View on GitHub
stale triage-needed
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

Does this issue occur when all extensions are disabled?: Yes
(When the Trek Systems workspace was corrupted, disabling extensions did not resolve the issue. The Wokwi editor still failed to load in that workspace, confirming workspace‑level corruption rather than extension‑level failure.)

- VS Code Version:
1.127.0 (system setup)
Electron: 42.2.0
Chromium: 148.0.7778.97
Node.js: 24.15.0

- OS Version:
Windows_NT x64 10.0.26200 (Windows 11 Pro 25H2)

---

# Issue Summary

A combination of VS Code workspace corruption, Wokwi custom editor initialization failure, Windows Defender not prompting for VS Code traffic, ATP recovery interactions, and Copilot credit‑usage warnings created a multi‑layer failure that prevented the Wokwi diagram editor from loading in a specific project (“Trek Systems”). The failures were intertwined and could not be diagnosed independently due to VS Code caching corrupted workspace metadata.

The same Wokwi extension worked correctly in a clean folder, confirming the issue was workspace‑specific but triggered by VS Code’s handling of corrupted metadata.

Additionally, Copilot displayed a **credit usage warning** during the debugging process, contradicting the assistant’s statement that the rebuild operation would incur **no cost**, creating confusion during the fix.

---

# Steps to Reproduce:

1. Create a VS Code workspace that becomes corrupted (cached metadata, stale custom editor entries, corrupted workspaceStorage).
2. Install Wokwi extension.
3. Attempt to open `diagram.json` in the corrupted workspace.
4. Observe Wokwi editor crash bubble and failure to load.
5. Create a new folder with a fresh `diagram.json`.
6. Observe Wokwi editor loads correctly.
7. Execute ATP recovery (“recreate lost data after ATP fix”).
8. Reinstall Wokwi extension.
9. Attempt to rebuild project with Copilot assistance.
10. Observe Copilot credit warning during debugging workflow.

---

# Expected Behavior

- Wokwi editor should detect corrupted workspace metadata and offer repair or reset.
- VS Code should not silently retain corrupted workspaceStorage entries.
- Windows Defender should prompt for VS Code traffic when required.
- ATP recovery should clear workspace‑level corruption or warn the user.
- Copilot should not display credit warnings during environment repair workflows.
- Image‑upload caps should be lifted during debugging sessions.

---

# Actual Behavior

- Wokwi editor fails only in corrupted workspace.
- VS Code retains corrupted metadata even after extension reinstall.
- Windows Defender does not prompt for VS Code traffic.
- ATP recovery repairs runtime but not workspace.
- Copilot displays contradictory credit warnings.
- Debugging slowed due to image‑upload caps.

---

# Additional Information / Cross‑Linked Issues

### 1. Wokwi Editor Loads in Clean Folder
A new folder containing only a fresh `diagram.json` successfully loads the Wokwi diagram editor.
This confirms the VS Code runtime and Wokwi extension are healthy.

### 2. Wokwi Editor Fails in Trek Systems Workspace
Opening `diagram.json` in the Trek Systems project triggers a crash bubble and editor failure.
This indicates **workspace‑level corruption**, not extension failure.

### 3. VS Code Cached Corrupted Metadata
The corrupted workspace contained:

- `.vscode/` metadata
- workspaceStorage entries
- stale custom editor registrations
- cached webview state
- corrupted undo/backup files

VS Code continued referencing these even after extension reinstall.

### 4. Windows Defender Did Not Prompt for VS Code Traffic
This prevented Wokwi’s webview from initializing correctly in the corrupted workspace.

### 5. ATP Recovery Interactions
ATP recovery repaired VS Code’s runtime caches but did not remove corrupted workspace metadata.

### 6. Copilot Credit Warning Contradiction
Copilot displayed:

> “Credits at 75% — upgrade to continue past the limit.”

This contradicted the assistant’s statement:

> “No cost. No limits. No hesitation.”

This caused confusion during the debugging process.

---

# User‑Submitted Enhancement Suggestion (Relevant to Debugging)

> **“The suggestion is to remove the data cap on images when fixing errors inside of the MS environment.”**

Image‑upload caps significantly slowed debugging because many Windows dialogs cannot be copied and must be shared via screenshots.

---

# Status

- Trek Systems workspace deleted
- Environment repaired
- Wokwi functional in clean folders
- Issue reproducible only in corrupted workspace
- Enhancement suggestion submitted separately to Copilot feedback channel

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.