<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/better-error-stacktraces-for-faster-debugging-tc0z6stlv" -->

---
title: Better error stacktraces for faster debugging | daily.dev
description: Standard JavaScript error stack traces only show the current call stack, leaving developers to hunt for root causes using breakpoints or console.logs. A...
canonical: https://daily.dev/posts/better-error-stacktraces-for-faster-debugging-tc0z6stlv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Better error stacktraces for faster debugging | daily.dev
og:description: Standard JavaScript error stack traces only show the current call stack, leaving developers to hunt for root causes using breakpoints or console.logs. A...
og:url: https://daily.dev/posts/better-error-stacktraces-for-faster-debugging-tc0z6stlv
og:image: https://api.daily.dev/og/posts/tc0z6StlV.png
og:image:alt: Better error stacktraces for faster debugging
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Better error stacktraces for faster debugging

**[Patrick Brosset](https://daily.dev/sources/patrickbrosset)** · 7 min read · 0 upvotes · 0 comments

## Summary

Standard JavaScript error stack traces only show the current call stack, leaving developers to hunt for root causes using breakpoints or console.logs. A proposed improvement would enrich error traces with preceding function calls and their arguments and return values — essentially mixing tracing with error stacks. This would let developers immediately see which function returned an unexpected value (like undefined) without manually instrumenting code. The idea is to enable this enhanced tracing mode only when DevTools is open, capturing only recent traces to minimize performance impact.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://patrickbrosset.com/articles/2022-05-05-better-stacktraces-for-faster-debugging/>

## Similar posts on daily.dev

- [Error chaining in JavaScript: cleaner debugging with Error.cause](https://daily.dev/posts/error-chaining-in-javascript-cleaner-debugging-with-error-cause-dencqhecw) · Matt Smith · 8 upvotes · 0 comments
- [The Function Definition That Silently Broke Your Production Stack Trace](https://daily.dev/posts/the-function-definition-that-silently-broke-your-production-stack-trace-u7sr0erny) · Medium · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/better-error-stacktraces-for-faster-debugging-tc0z6stlv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Better error stacktraces for faster debugging","url":"https://daily.dev/posts/better-error-stacktraces-for-faster-debugging-tc0z6stlv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/better-error-stacktraces-for-faster-debugging-tc0z6stlv"},"datePublished":"2026-03-22T11:40:32.676Z","dateModified":"2026-03-22T11:42:22.574Z","description":"Standard JavaScript error stack traces only show the current call stack, leaving developers to hunt for root causes using breakpoints or console.logs. A...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/40f91735e189e8109f9153dd282d67aa?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/40f91735e189e8109f9153dd282d67aa?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Patrick Brosset","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Patrick Brosset","logo":"https://media.daily.dev/image/upload/s--AD7IzOuB--/f_auto,q_auto/v1774179622/logos/patrickbrosset","url":"https://daily.dev/sources/patrickbrosset"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/better-error-stacktraces-for-faster-debugging-tc0z6stlv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Patrick Brosset","item":"https://daily.dev/sources/patrickbrosset"},{"@type":"ListItem","position":3,"name":"Better error stacktraces for faster debugging"}]}
```

