Better stack traces
See original GitHub issueSo we’ve just shipped new stack traces in RunKit, and I’d really like Ramda to have easier to read stack traces (even outside of our tools). Currently it contains lots of Object.f2s and such, and I did a few experiments with setting functions names.
Here you can see what Ramda looks like currently:

( https://runkit.com/tolmasky/ramda-current-traces )
And here is what they could look like:

( https://runkit.com/tolmasky/ramda-better-traces-22 )
Basically, the trick is to do something like this:
function functionNamed(aFunction, aName)
{
Object.defineProperty(aFunction, "name", { value: aName });
aFunction.displayName = aName;
return aFunction;
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:5 (3 by maintainers)
Top Results From Across the Web
mjpizz/better-stack-traces - GitHub
Detailed stack traces with code snippets for node. - GitHub - mjpizz/better-stack-traces: Detailed stack traces with code snippets for node.
Read more >better-stack-traces - npm
Detailed stack traces with code snippets.. Latest version: 1.1.0, last published: 8 years ago. Start using better-stack-traces in your ...
Read more >Stack Trace Formatter - Pretty print your exception messages
Using the .NET stack trace formatter, you can pretty print any stack trace and either copy and paste it or download a screenshot...
Read more >Better Exception stack traces in .NET with Ben.Demystifier
Become a Patreon and get source code access: https://www.patreon.com/nickchapsasCheck out my courses: https://nickchapsas.
Read more >The Dreaded Stack Trace - Joseph Gefroh
You can keep scrolling to go deeper and see more inner errors that may have triggered the error. Examples. Below is an example...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was hot on this some time back, using techniques from https://medium.com/@drboolean/debugging-functional-7deb4688a08c#.f0g8hif9c but I never got finished with it. I would love to see something like this in the library, as much for debugging consoles as for stack traces.
It’s a fair bit of work, but I think it would be worth it.
Feel free. I absolutely think it is worth doing.