Debug runtime error

Debug runtime error in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
The app crashes on page load with a runtime error. Inspect the stack trace, identify the failing…
The app crashes on page load with a runtime error. Inspect the stack trace, identify the failing file and line, add a defensive guard and a clear error message, then re-run to confirm the page loads. Commit the fix with a one-line description referencing the stack trace top line.

Improve — make it easier to accept

+
Before I push a runtime error fix, make it easier for the reviewer to accept. Highlight the stack…
Before I push a runtime error fix, make it easier for the reviewer to accept. Highlight the stack trace top file and line, show the minimal guard you propose, and call out any assumptions (null value, undefined API response) that would make the guard wrong so the reviewer can challenge them.

Decide — diagnose the stuck moment

+
I added a component and now users hit TypeError: cannot read property 'map' of undefined in…

Console shows TypeError: cannot read property 'map' of undefined at renderList

I added a component and now users hit TypeError: cannot read property 'map' of undefined in renderList. I don't know whether data failed to load or I passed the wrong prop. The component is used in three places. Which is most likely, how do I quickly confirm it, and what minimal code change will make the UI resilient without hiding a real bug?

Become — change the pattern

+
Across sprints we keep shipping code that assumes API arrays always exist and it blows up in…

We repeatedly deploy crashes caused by unchecked API responses

Across sprints we keep shipping code that assumes API arrays always exist and it blows up in production when responses change. I need a pattern to stop these runtime errors at source. Recommend one coding practice, one automated check for CI, and a short PR review question that catches dangerous assumptions about external data.

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.