Panel Not Loading
What You’ll See
Section titled “What You’ll See”DBCode panels stay blank, and you may see a notification like:
Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state.
This comes from VS Code’s webview host, not from DBCode. VS Code renders every panel, including DBCode’s, inside a Chromium webview backed by a service worker. When that webview host fails to register the service worker, no panel in the window can render. DBCode surfaces the failure with a notification because its own panel never loads, but the underlying problem is in VS Code itself: microsoft/vscode#125993.
Confirm It Is Not DBCode
Section titled “Confirm It Is Not DBCode”Before changing anything, confirm the webview host itself is broken, not just DBCode:
- Open any markdown file in VS Code.
- Press Ctrl+Shift+V (Cmd+Shift+V on macOS) to open the built-in markdown preview.
If the markdown preview is blank or fails the same way, the webview host is broken for the entire window, not just for DBCode. Every extension that uses a webview (including DBCode) is affected until this is fixed.
Restart Properly
Section titled “Restart Properly”Start with Reload Window, either from the button on DBCode’s notification or by running Developer: Reload Window from the command palette. It clears the problem often enough to be worth the two seconds it costs.
If the panel is still blank after that, quit VS Code completely, all windows, not just the one that’s failing. On macOS this means Cmd+Q, not closing the window. On Windows and Linux, close every VS Code window and confirm no Code.exe or code process is still running.
A full quit is more reliable than a reload, because a reload restarts the extension host without necessarily clearing the underlying Chromium service worker registration.
Clear The Webview Cache
Section titled “Clear The Webview Cache”If a full restart doesn’t fix it, the cached service worker state itself may be corrupt. With VS Code fully closed, delete these four directories. VS Code rebuilds them automatically on next start:
- Windows, under
%APPDATA%\Code\:Service Worker,Cache,Code Cache,GPUCache - macOS, under
~/Library/Application Support/Code/:Service Worker,Cache,Code Cache,GPUCache - Linux, under
~/.config/Code/:Service Worker,Cache,Code Cache,GPUCache
Then start VS Code again and reopen DBCode.
If It Keeps Coming Back
Section titled “If It Keeps Coming Back”If the problem returns after a clean restart and cache clear, look at what’s interfering with Chromium’s service worker storage in your VS Code profile directory:
- Profile directory redirected or synced - OneDrive Known Folder Move, a corporate roaming profile, or any tool that syncs
%APPDATA%\Code\(Windows) or the equivalent profile directory can corrupt or lock service worker storage mid-write. - Low disk space - service worker registration can fail silently if the volume holding your VS Code profile is nearly full.
- Antivirus or DLP software - security software that scans or intercepts file writes in the profile directory can block the service worker files from being written correctly.
Excluding the VS Code profile directory from sync and from antivirus/DLP scanning, or freeing up disk space, resolves this in most of these cases.
Upstream
Section titled “Upstream”This is tracked upstream as microsoft/vscode#125993. There’s nothing DBCode can do to fix it directly since it happens before DBCode’s panel ever gets a chance to load.