---
title: "The 3 Levels of Debugging With AI"
description: "AI-assisted debugging falls into three levels: pasting raw errors into an LLM (\"lazy prompting\"), writing structured bug-report-style prompts with code, environment, expected vs. actual behavior, and attempts so far, and agents that drive real debuggers."
url: "https://swe.quest/articles/the-3-levels-of-debugging-with-ai-2547609068f4c653"
canonical: "https://neon.com/blog/the-3-levels-of-debugging-with-ai"
source: "Neon"
published: "2025-05-22"
difficulty: "medium"
kind: "How-to"
reading_minutes: 8
tags: ["ai-coding","debugging","ai-agents","llms"]
---

# The 3 Levels of Debugging With AI

A post on [Neon](https://swe.quest/sources/neon.md), published 2025-05-22, 8 min read, How-to. Original: [https://neon.com/blog/the-3-levels-of-debugging-with-ai](https://neon.com/blog/the-3-levels-of-debugging-with-ai)

## Summary

AI-assisted debugging falls into three levels: pasting raw errors into an LLM ("lazy prompting"), writing structured bug-report-style prompts with code, environment, expected vs. actual behavior, and attempts so far, and agents that drive real debuggers. Lazy prompting suits shallow bugs with clear stack traces but risks generic or hallucinated fixes, while structured prompts reduce hallucinations and force you to reason about the bug. Microsoft's debug-gym lets agents set pdb breakpoints, inspect variables and write tests inside Docker sandboxes, lifting o1-preview from 10.7% to 30.2% and Claude 3.7 Sonnet from 37.2% to 48.4% on SWE-bench Lite. Recommended practices include time-boxing, verifying fixes, sandboxing agents, logging their actions and keeping humans in the review loop.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- LLM prompting basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- stack traces

## Keywords

debug-gym, Claude, Cursor, SWE-bench Lite, pdb, lazy prompting

## Related posts

- [Debugging our AI search assistant with agent tracing](https://swe.quest/articles/debugging-our-ai-search-assistant-with-agent-tracing-56459c7d4f094d19.md): Sentry · 2026-09-11 · Medium · 4 min read · AI agents, Observability, Debugging, Evaluation, LLMs
  Sentry's Search Query Assistant converts natural-language prompts into Sentry Search Syntax, and its team relies on evals plus agent tracing to debug wrong outputs.
- [Making Failure Diagnosis Reliable with Pensive AI](https://swe.quest/articles/making-failure-diagnosis-reliable-with-pensive-ai-99ce7ba81c232629.md): Netflix TechBlog · 2026-10-26 · Medium · 16 min read · LLMs, Evaluation, Debugging, Data pipelines, Observability
  Netflix augmented Pensive, its rule-based failure diagnosis system for data and ML workloads, with LLM-based error extraction and on-demand debugging after roughly half of seven million failure classifications landed in an "unknown" bucket.
- [Prompt Engineering as a Developer Discipline](https://swe.quest/articles/prompt-engineering-as-a-developer-discipline-9bcd55d9132c84f2.md): Neon · 2025-04-21 · Medium · 16 min read · AI for coding, LLMs
  Developers should treat prompts as modular, testable software components rather than guesswork, applying the same rigor they bring to code.
- [Using Docker AI Tools for Devs to Provide Context for Better Code Fixes](https://swe.quest/articles/using-docker-ai-tools-for-devs-to-provide-context-for-better-code-fixes-c0163de9f3027f93.md): Docker · 2024-10-21 · Medium · 8 min read · AI for coding, AI agents, Static analysis, Containers, Python
  LLMs fix lint violations far better when given the surrounding code, so Docker Labs built a prompt-driven pipeline where each step runs in a container: Pylint produces a violation report, violations are loaded into SQLite, and Tree-sitter parses the project into an AST whose top-level statement ranges are indexed alongside the source.
- [You can’t vibe code a prompt](https://swe.quest/articles/you-can-t-vibe-code-a-prompt-7bae994c4b57de8e.md): incident.io · 2025-03-25 · Medium · 11 min read · LLMs, Evaluation, AI for coding
  Letting an LLM iteratively rewrite a prompt until evals pass produces overfitted, brittle prompts.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
