I want JavaScript error stack traces to be more helpful

Submitted by Patrick Brosset

This idea is currently being discussed.

When a JavaScript error is thrown, the stack trace I see in DevTools shows me where the error occurred — the chain of function calls that were active at that moment. But the real root cause of a bug is frequently not in that list. It lives earlier in the execution: in an argument that was passed incorrectly, a return value that was mishandled, or a call that happened several frames before the failure.

Today, tracking down the root cause means semi-randomly placing breakpoints or sprinkling console.log calls throughout the code until you get lucky. This is frustrating and time-consuming.

I want JavaScript engines to capture richer tracing information, especially when running in a developer/debug mode where performance trade-offs are acceptable. Specifically:

This would let me see not just where my program broke, but why it broke — dramatically speeding up debugging and reducing reliance on breakpoint-heavy workflows.

Tagged
JavaScript DevTools
Votes
0
What are votes for and how are they tallied?