Notes on Developing VS Code

Last modified February 16, 2025.

While developing VS Code, I’ve ran into some snippets and links that I often refer to or refer others to. I’ll likely add to this list as new things come up, though this list is personalized to my experiences.

Running with disable-gpu

Many rendering glitches can be mitigated by running VS Code in the terminal with the --disable-gpu flag:

code --disable-gpu [file-or-workspace]

Extension bisect

Extension bisect is a cool feature in VS Code that does a binary search through sets of installed extensions to help the user figure out which extension could be contributing to an issue that they are seeing. I highly recommend using this feature when it appears that an extension is causing buggy behaviour, but it isn’t clear which extension is doing so.

OSS freezes after an Electron update

Sometimes after an Electron update, the OSS build (the build that one gets by manually compiling the repository files) freezes moments after being launched. In that case, I do a full clean build by running git clean -xfd before running npm i and npm run watch again.

Clean uninstall/Clearing out user data dir files

I once encountered a situation where the GitHub Pull Requests and Issues (GHPRI) extension seemed to be corrupted to the point where even reinstalling it didn’t work. But, I wasn’t able to reproduce the problem with a fresh user data directory (which one can obtain by launching VS Code with --user-data-dir pointing to an empty directory). I didn’t mind reconfiguring my instance from scratch, considering a lot of it was filled with one-off modifications from previous endgames, and deleting the folders indicated in the linked documentation above resolved my issue. I haven’t broke the GHPRI extension in the same way since then, so I don’t have a reproducible bug to file.

Running files from an unsigned archive on macOS

After downloading an unsigned file from the internal builds page, one needs to run the command

xattr -d com.apple.quarantine <path-to-unsigned-file>

on the file, and then manually extract it. Otherwise, directly extracting the file leads to security errors showing up when attempting to launch the program.

Smoke test notes

The best notes I have found on manually running VS Code smoke tests are in the repository’s Smoke test README.

GitHub rate-limiting issues, or errors when fetching packages or pushing

There’s been a few times now when I was rate-limited while running GitHub Issue Notebooks, unable to fetch packages (I’d get 401 errors), or unable to push changes. It turns out that every time, either I forgot to log in to GitHub, or my GitHub personal access token (PAT) expired and I needed to create a new one.

I noticed that the GitHub PAT format has changed a few times over the last year, though I’m not sure whether that explains the tokens expiring.


Go back to Articles