How-to

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

  1. Download Loqua and move it to /Applications.
  2. Grant the requested Accessibility permission so Loqua can work with your active apps.
  3. 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.
  4. Open your IDE, terminal, browser, or any app where the error appears.
  5. 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.

You capture
The error message, highlighted code, file location, and surrounding context in your IDE.
You ask
“What is causing this error, and what should I check first?”
Loqua shows
The API response may be returning an unexpected value before the component processes it. Check the response structure first: the component expects an array, but the returned value may be 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

Can Loqua analyze screenshots with AI?
Yes. Loqua uses image and screenshot understanding to read visible information and answer from that context.
Is Loqua an AI screenshot analyzer?
It goes beyond an isolated image analyzer by combining screen capture, voice questions, and working context.
Can Loqua help fix coding errors?
It can explain errors, identify possible causes, and suggest fixes. Developers should review and verify changes before applying them.
Do I need to copy error messages first?
No. Capture the error where it appears, ask your question, and keep debugging.

Try Loqua today

Free to start. Mac native. Built by algorithm researchers who use it every day.

Download for Mac

More from the Loqua Blog

How-to
How to dictate code on Mac: a complete guide for Cursor, VS Code, and Claude Code
How-to
Voice typing for AI coding: voice prompt Cursor and Claude Code without typing
Engineering
Multimodal voice recognition: building a listener that sees what you see