Skip to content

[VS Code] Increase logging during token refresh + consider storing the log permanently

Problem

We face one or more hard-to-reproduce bugs with our OAuth token refresh (&10941). One of the steps towards a solution is to increase logging.

We should also consider options for making the logs non-volatile (i.e. store them for longer than one session), so that when the user notices there is an error, they can send us full log. This could be done, for example, by creating a temp file with the logs (the /tmp folder gets deleted during system restart which probably happens nowhere near as often as restarting VS Code windows), and storing the name of the temp file in the ExtensionContext.glablState https://code.visualstudio.com/api/references/vscode-api#ExtensionContext. We would have to consider how to keep the current logging for WebIDE which doesn't have filesystem access.

The logging should be focused on the token refreshing and general access to the secret storage:

The pre-requisite for this work should be connecting the extension to the local GDK and reducing the token expiry duration to some much shorter time (currently 2h in prod).

Edited by Tomas Vik (OOO back on 2026-01-05)