Debugging Best Practice

Hi - Replit is getting much better every few months, but I’m spending the same amount of time on debugging and as you get to 5+ features, layering on in succession, it gets very brittle.

Question - How are folks solving their bugs, mainly around feature not appearing/ working as expected or very technical crashes (e.g., Maximum update depth exceeded) that it can’t solve on own?

What’s working for me (a bit better) - Asking Agent to brainstorm 5 ideas, rank them by likelihood, then ask to confirm which are in fact an issue, but it often take 2-3 iterations.

Curious - are people asking Replit to explain them the code, porting to cursor at a certain scale, etc?

Appreciate any insights and I’m sure everyone would benefit.

1 Like

A prompt that has given me some success recently. Agent/Assistant. Give it enough context and it finds bugs/fixes pretty fast.

result from my testing. you can see test 1 and test 2. are these expected results?

1. description of test one.
- result:

browser console log:

server log:

2. description of test two.
- result:

browser console log:

server log:

1 Like

GPT4o has been insanely good at debugging. I usually paste errors from Browser Console or Replit Console into GPT4o and it provides insanely good diagnosis and fixes. I then copy/paste back into assistant/agent (usually Agent tbh) and it seems to handle bugs quite well.

2 Likes

Interesting, so kind of a unit test to confirm expected result through logs.

1 Like

Thanks for the advice. Its helping for sure.

Yes, eventually I’d like to automate this

As the application gets bigger, I often refactor it to be more modular. This makes it easier for the agent to basically follow the folder tree, and load in the correct context. I also rollback and start new chats frequently.