How to explain a code error with AI
Skip the copy-paste loop. Capture the error, ask what happened, and keep the context.
TL;DR
This practical guide explains code errors with AI using Loqua, a screenshot-aware assistant for developers who want help without leaving their workflow. Capture the error where it appears, ask naturally, and let visible code, stack traces, and surrounding context travel with the question. AI analysis should not replace developer judgment; it should shorten the distance between seeing a problem and knowing what to check next.
Setup in 90 seconds
- Download Loqua and move it to
/Applications. - Grant the requested Accessibility permission so Loqua can work with your active apps.
- Open Settings and confirm your shortcuts. Defaults include Fn for Dictation, Fn + Space for Ask AI, Fn + ↑ for translation, and Left Shift + A + Command (⌘) for Screenshot Q&A.
- Open your IDE, terminal, browser, or any app where the error appears.
- Capture the error, ask your question, and keep working.
Every shortcut is customizable. Change them in Settings to match your workflow.
Screenshot an error without breaking your flow
You change several files in Cursor and the app stops working. The IDE shows a stack trace, highlighted code, and the location of the failure. The traditional loop is: copy the error → open an AI chat → paste → explain what changed → wait.
The error message is only part of the context. The useful information is often the file, highlighted line, surrounding code, and current workflow state.
undefined.You see the error, ask the question, and continue debugging. Loqua combines screenshot understanding, voice input, and working context rather than treating the image as an isolated file.
Common debugging scenarios
Explain errors from your IDE
Capture the visible error and ask: “What is the likely root cause, and which line should I inspect first?” Loqua can identify a likely cause and suggest the next diagnostic step.
Understand unfamiliar messages
Compiler warnings, framework messages, and type errors often describe symptoms rather than the real problem. Ask: “Explain this in plain language and tell me what condition triggered it.”
Explore a correction
Once the issue is clear, ask: “What is the smallest safe fix, and what test would verify it?” Treat suggested code as a starting point and review it before applying larger changes.
Continue with voice follow-ups
The first question is rarely the last. Continue with: “Could this also fail when the response is empty?” or “Show me how to guard this without changing the public API.” You do not need to capture and explain the same error again.
When screenshot Q&A works best
Use it when the missing information is already visible: IDE errors, terminal output, browser console messages, CI/CD logs, documentation, and technical diagrams.
Use direct dictation when the problem is mainly about behavior that is not visible—for example, “the save button only fails after the second login.” Not every problem needs a screenshot. The advantage comes from recognizing when your screen already contains the missing context.
Frequently asked questions
Try Loqua today
Free to start. Mac native. Built by algorithm researchers who use it every day.
Download for Mac