Originally published at gidadomukhta.me . Install it from the VS Code Marketplace or read the source on GitHub .
Most error messages are only half the story. A TypeScript message such as "Type 'string' is not assignable to type 'number'" tells you that two types disagree, but not which value caused it, which call produced it, or what the code around it is doing. To get a useful answer from an AI assistant, developers usually reconstruct that missing context by hand: they copy the message, find the line, scroll up to the function, and paste it all into a chat window. It works, but it's slow, and the result depends on how much context the developer remembered to include.
ErrorCopy: AI Error Explainer is a VS Code extension that automates that step. It reads the diagnostic directly from the editor, gathers the code around it, and builds a consistent prompt that you can send to the AI tool of your choice.…