DEV Community

Cover image for How to Fix Bugs using Screenshots with Amp
Srujana Maddula
Srujana Maddula

Posted on

How to Fix Bugs using Screenshots with Amp

Amp is an agentic coding tool that can run in your VS-Code and as well as a command line tool in your terminal.

It's your best AI assistant in performing autonomous reasoning, comprehensive code editing, and complex task execution. You tell it what you want in plain English, and it makes the changes.

But here’s the cool part: Amp isn’t just a chatbot. You don’t always have to explain everything in text. You can drop in a screenshot with little or no context, and Amp will understand it and take the necessary action.

I’ll show you how to use Amp to fix a bug in your codebase using screenshots.

Fixing Bugs with screenshots

I have a Streamlit app in VS Code. It’s built to show different business metrics in charts. But I see a value error on the UI. Here’s how I’ll fix it with just the error screenshot.

In my Streamlit app, clicking the “Click Me” button throws the following error.

error screenshot fed to Amp code

All I did was take a screenshot of this page and send it to Amp in VS Code with a short note: “Failed when I click the ‘Click Me’ button, check the screenshot for more context.”

Amp code chat window

Amp read the screenshot, understood the error, and identified relevant part of my codebase. Then it proposed a fix, showed me the changes, and after my approval applied the solution automatically.

Why Use Screenshots to Fix Bugs in Amp?

Long error messages are painful to copy and paste, and sometimes you just don’t feel like typing them into a chat window. In that case, you just simply click a photo and give it to Amp.

The tool connects the dots between what's on screenshot and the code that produced it. Because it is working directly from the actual error on screen, the solution often feels more accurate and intuitive. Therefore, this approach is more reliable as well as fast and easy. Explore the full potential of Amp here.

Top comments (0)