Investigate VS Code telemetry errors and pinpoint root causes effectively.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "fix-errors" skill from askskill: 1. Download https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/fix-errors/SKILL.md 2. Save it as ~/.claude/skills/fix-errors/SKILL.md 3. Reload skills and tell me it's ready
Analyze this VS Code error telemetry issue using the error message, stack trace, and hit/user counts. Trace the call stack to determine which layer produced invalid data and which layer merely crashed while consuming it, then suggest the best fix point with reasons.
A root-cause analysis distinguishing the bad-data producer from the crashing consumer, with the recommended fix location.
The current unhandled error message is too vague for telemetry-based debugging. Rewrite it into a more diagnosable error message and explain what context fields, state details, or parameters should be included to make future issues easier to identify in the telemetry dashboard.
A clearer error message example plus a checklist of diagnostic context to include.
Review this error-handling code path and check for anti-patterns such as silently swallowing errors, catching exceptions too late, or missing contextual wrapping. From a telemetry investigation perspective, recommend safer error handling and logging improvements.
An anti-pattern review with improvements that make telemetry-based debugging more effective.
When fixing an unhandled error from the telemetry dashboard, the issue typically contains an error message, a stack trace, hit count, and affected user count.
The error manifests at a specific line in the stack trace, but the fix almost never belongs there. Fixing at the crash site (e.g., adding a typeof guard in a revive() function, swallowing the error with a try/catch, or returning a fallback value) only masks the real problem. The invalid data still flows through the system and will cause failures elsewhere.
Read each frame in the stack trace from bottom to top. For each frame, understand:
The goal is to find the producer of invalid data, not the consumer that crashes on it.
Sometimes the stack trace only shows the receiving/consuming side (e.g., an IPC server handler). The sending side is in a different process and not in the stack. In this case:
Fix the producer directly:
UriComponents objects, not as strings)Given a stack trace like:
at _validateUri (uri.ts) ← validation throws
at new Uri (uri.ts) ← constructor
at URI.revive (uri.ts) ← revive assumes valid UriComponents
at SomeChannel.call (ipc.ts) ← IPC handler receives arg from another process
Wrong fix: Add a typeof guard in URI.revive to return undefined for non-object input. This silences the error but the caller still expects a valid URI and will fail later.
Right fix (when producer is unknown): Enrich the error at the IPC handler level and in _validateUri itself to include the actual invalid value, so telemetry reveals what data is being sent and from where. Example:
// In the IPC handler — validate before revive
function reviveUri(data: UriComponents | URI | undefined | null, context: string): URI {
if (data && typeof data !== 'object') {
throw new Error(`[Channel] Invalid URI data for '${context}': type=${typeof data}, value=${String(data).substring(0, 100)}`);
}
// ...
}
// In _validateUri — include the scheme value
throw new Error(`[UriError]: Scheme contains illegal characters. scheme:"${ret.scheme.substring(0, 50)}" (len:${ret.scheme.length})`);
Right fix (when producer is known): Fix the code that sends malformed data. For example, if an authentication provider passes a stringified URI instead of a UriComponents object to a logger creation call, fix that call site to pass the proper object.
Before proposing any fix, always find and read the code that constructs the error. Search the codebase for the error class name or a unique substring of the error message. The construction code reveals:
…
Generate or update chat customization files for AI coding agents.
Merge session branch changes back into the base branch cleanly.
Create and maintain screenshot test fixtures for UI components effectively.
Launch VS Code OSS in isolation for automation and multi-process debugging.
Configure and manage agents, skills, prompts, and integrations in the editor.
Investigate failed PR checks and iteratively fix CI issues faster.
Extract and verify React error messages and codes to debug unknown warnings.
Learn robust error-handling patterns across TypeScript, Python, and Go applications.
Fix lint, formatting, and common code issues before passing CI.
Analyze bugs and tracebacks to find root causes and likely fixes.
Systematically reproduce, isolate, diagnose, and fix tricky software or environment issues.
Systematically investigate bugs, test failures, and unexpected behavior before fixing.