How to Debug a Vibe-Coded App That Is Not Working

Debug a vibe-coded app by naming one broken path and the real error before you prompt again. The fix depends on whether it is data, auth, or money.

By Muhammad Saif and Aashan Khan · Techtribe co-founders

A vibe-coded app that is "not working" is usually one path that does not finish, described as if the whole product had died. The chat where it was built is full of earlier instructions. The next prompt says "fix the app." The model changes several files. Something else moves. You now have two problems and less idea which line caused either.

Debugging is the step before that prompt. It is how you name the path, the input, and the real error. The repair itself, once the path is named, lives in fix a vibe-coded app. This note stops at the name. If you leave with one sentence of the form "when this user does this, that record is wrong, and here is the error," you have debugged it. If you leave with a new prompt and a hope, you have not.

Start with one path, not the product

Write the path the way a user would. "A customer saves a profile and the next page is empty." "A second user can open the first user's invoice." "Checkout says paid and the order never appears." One sentence. If you have five sentences, pick the one that loses money, leaks data, or blocks the only flow you are showing people. The others wait.

Do that path yourself, with the same kind of account the user had. Your admin login hides a class of bugs that only exist for a normal account. Use a second browser or a private window so you are not secretly still the admin.

Write down what you expected and what happened, in the product's words, not in the model's. "The list should show the row I just saved. It shows no rows." That is a bug report. "The AI broke the database" is a mood.

If you cannot reproduce it, you cannot debug it yet. Ask the user for the time, the account, and what they clicked. Look at that account's data. A bug that exists only in their row is still a bug. A bug you cannot trigger at all may be a stale deploy, a cached page, or a story that does not match the build that is live. Confirm which URL and which commit you are looking at before you change code.

Get the real error, not the toast

Generated apps often catch an exception and show a generic toast, or they show nothing. The real error is in the server log, the function log, the browser network panel, or the database. Open those before you open the chat.

In the browser, the failed request tells you the status and sometimes the body. A 401 is identity. A 403 is permission. A 404 is the wrong id or a route that was never deployed. A 500 is the server, and the useful text is on the server, not in the toast. A 200 with an empty list is not "working." It is a successful query that returned nothing, which is its own kind of bug.

On the server, copy the message and the stack once. A column that does not exist, a policy that rejects the insert, a timeout, a null where an object was required. That sentence is what you may later paste into a prompt. Pasting "it doesn't work" throws away the only fact you gathered.

If there is no log, that is the first finding. You are debugging blind. Turn the log on for that function, reproduce once, and read it. Do not add five features of logging. One path.

Sort the failure into a bucket

Most "not working" reports in a generated app land in one of four buckets. The bucket decides which guide to read next, and whether you should be prompting at all.

Data. The form does not save, the list is empty, a column was renamed, a migration never ran, or a policy filters every row to zero. The screen is a symptom. The table is the fact. The triage for that bucket is fix database errors in a vibe-coded app. Go there when the error names a relation, a column, a policy, or a connection, or when a 200 returns no rows and the row exists for a different account.

Auth and access. The user is signed in as the wrong person, or signed in and able to read someone else's row, or signed out and still able to call the endpoint. This is not a styling bug. The repair order for access control is part of fix a vibe-coded app, and the Supabase-shaped version is RLS mistakes in AI-generated apps. If a second test account can see the first account's data, stop prompting and treat it as a leak.

Money. The provider says paid and your database does not, or it says paid twice. The webhook is the usual suspect: it never arrives, it arrives and is not verified, or a retry creates a second order. That path is Stripe webhooks that never fire, or fire wrong, in an AI-built app. Test-mode charges hide this, because test charges succeed. Look at a live event if the bug is about a real card, and do not paste card numbers into a chat while you do it.

Silent logic. The page loads, the write succeeds, and the booking, the price, or the permission is still wrong. No red error. Columbia's review of coding agents found this class, error handling and business logic, among the most serious failures, because the code runs. The longer note is when a Replit or v0 app breaks in production. Debugging here means comparing the rule you wanted with the value that was stored, on one example, not asking the model to "make the logic more robust."

If you cannot sort it, you do not yet know enough. Another hour of clicking with the logs open is cheaper than a prompt that touches all four buckets.

Reproduce it as a tiny script in your head

Say the steps out loud. Account. Click. Input. Expected row. Actual row. Five lines. If the steps include "and then it also should have emailed, and the dashboard should have updated, and the admin should have seen it," you are holding three paths. Debug the one that the user called broken.

Keep the input. The document, the form values, the id. A bug that depends on one id is debugged with that id, not with a fresh record that happens to work.

Note the time. A failure that started after a deploy is a different search from a failure that has been there since the first prompt. Your host's deploy history and the commit are part of the evidence. "It worked yesterday" is only useful if you can point at what changed yesterday.

What not to do while you are still naming it

Do not tell the model "fix all the bugs." You have not listed them. The model will pick a plausible bug and edit a wide area. You will then debug the edit.

Do not start a second chat that has none of the context and paste the whole repo into it. You will get a second opinion that rewrites the schema. Two rewrites do not make a diagnosis.

Do not turn logging on for every function, commit it, and leave it. Logs that print tokens, session cookies, or customer records become the next incident. Log the error and the id, not the secret and not the document body.

Do not "fix" a leak by hiding the screen that shows the other user's data. The endpoint is the bug. If a second account can fetch the first account's id, the screen is irrelevant. Stop and read the access guide.

Do not keep prompting a payment bug against live cards. Switch to the provider's test mode once you know which event is missing, or stop and let someone who can read the webhook handler do it. The debugging step is "which event, which order id, was it verified." The code change is the next step, and it is not a guess you want running on a real charge.

A short sequence you can run today

One. Write the one-sentence path.

Two. Reproduce it as the kind of user who hit it.

Three. Read the status code, the server error, and the row in the database. Copy them somewhere outside the chat.

Four. Name the bucket: data, auth, money, or silent logic. Open the guide for that bucket if you are going to change code yourself.

Five. If you do prompt, prompt with the error and the file you believe is responsible, and ask for a change you can test on the same path. Run the path. If a second path breaks, revert. The model does not get a second wide pass until the first path is either fixed or handed to a person.

Six. If the bucket is auth or money and you cannot explain the handler, stop. A wrong fix on that path is worse than stopping for a scope call.

That sequence is the whole method. Tools vary. The sequence does not. A debugger, a SQL console, and the network panel are enough for almost every report we see on a generated app. A new framework for "AI debugging" is not the missing piece. The missing piece is the sentence and the error.

What the symptoms usually mean

An empty list for you in one browser and a full list in another is often a session or a policy, not a missing table. Check which user id the request sends.

A save that spins and then toasts "something went wrong" is often a constraint: a required field the form does not send, or a policy that allows select and not insert. The database error says which.

A page that is fine for the owner and blank for a collaborator is almost never CSS. It is a rule that treats the creator as the only reader.

A button that works twice and creates two records is a missing guard on the write, or a webhook retry. Look at the two ids and the timestamps before you disable the button and call it fixed. Disabling the button does not stop the provider from retrying.

A feature that works on your laptop and fails on the deployed URL is configuration: an environment variable, a redirect URL, a key that exists locally and not in the host. Compare the names, not the values, in a chat. Do not paste the values into the model.

A feature that failed after you asked for an unrelated change is a regression. Look at the diff of that change before you ask for a new one. The offending lines are often sitting in the last commit, next to a comment that says the model cleaned things up.

When the app is "not working" and there is no error at all

This is the discouraging case, and it is common. The model agreed to a rule in the chat. The code does a simpler rule. Nobody throws. You only notice because a price is wrong or a step is skipped.

Pick one example with numbers. "This booking is three hours and the total should be the rate times three. The total stored is the rate times one." Find where the total is computed. Read it. You are done debugging when you can point at the line and the example. You are not done when you have a theory. The line is the handoff, either to a small prompt that changes that computation and nothing else, or to a person.

If you cannot find the line because the computation is spread across five generated helpers that all look plausible, that is also a finding. The path is real, the code is not inspectable by you, and more prompting will spread it further. That is a reason to book a call, with the example attached.

The same pattern shows up when tests are green because the tests were edited to match the bug. If a test asserts the wrong total, the suite is not evidence. What breaks when an AI-built app has no real tests covers that failure. For debugging, the rule is simpler: trust the example you calculated by hand over a test you did not write.

What to bring if you want a second pair of eyes

The live URL. The repository. The one-sentence path. The error or the wrong row. The account type you used. What you already tried, in a few lines, so the next person does not repeat a prompt that made it worse.

You do not need a full specification, a slide deck, or a list of every screen you wish existed. Those belong to a build. A debug conversation is about one failure. If the conversation reveals that the failure is the architecture, the scope can grow, and the place it grows into is the fix guide, a defined repair, or a Production MVP when the foundations are what you actually need. That decision comes after the path is named, not before.

If the product is something you still want, and the bug is that a stranger cannot finish the only flow, say that. A small repair and a new MVP are different purchases. The call is where we tell you which one matches the path you brought. The AI MVP page is the service around building or rebuilding that flow when a repair is no longer honest. Debugging is how you tell the difference.

A rule for the next prompt

You may prompt when three things are true. The path is one sentence. The error or the wrong value is copied. You know how you will retest, and you can revert. If any of the three is missing, you are not debugging with the model. You are asking it to pick a bug for you.

Write the sentence first. The chat can wait.

If this is your app, send the repo.

A 30-minute scope call. We read what is live, name what is dangerous, and quote a fixed scope.

How Techtribe debugs a generated app

We start from the path you cannot finish, the URL, and the repo. If the failure is a bounded data, auth, or payment bug, we define a fixed repair and we do not wander into a rewrite. If the foundations are what failed, the Production MVP is the scope that replaces them on purpose. The packages page names the scopes. What they cost is in how much an AI MVP costs. We will also tell you when the problem is smaller than either.

The scope call is 30 minutes with a founder. Bring the one path, the error or the wrong record, and access to the repo. If the app started in a builder, the notes for Lovable, Bolt, v0, and Replit say what those exports do and do not include. The wider repair, once the path has a name, is fix a vibe-coded app. The service page for a rebuild is AI MVP development.

Questions

How do I debug a vibe-coded app?

Pick one path a user cannot finish. Reproduce it. Read the real error, the network response, or the row in the database. Decide whether the failure is data, auth, a payment webhook, or silent logic. Then change that one thing, or stop and get a person to read it.

Why is my vibe-coded app not working if the screen loads?

The screen can load while the write, the charge, or the permission is wrong. Those failures often produce no red error. Compare what the user did with what the database and the payment provider recorded.

Should I ask the model to fix it?

Only after the broken path is named and you can test that path after the change. A prompt that says the app is broken invites a wide edit. Wide edits are how a second feature breaks while the first one looks fixed.

When should I stop debugging and book a call?

When the path touches sign-in, who can read whose data, a payment, or a migration, and you cannot explain the code that handles it. Bring the URL, the repo, and the one path. A scope call is for that, not for a tour of every screen.

Book a free call

Have a vibe-coded app in production?

30-minute free call. We'll read what you have, name what is dangerous, and quote a fixed scope.