Session Title:
Untangling crash stacks with pasta
Session Abstract:
Source code often gets modified one way or another before hitting production - through transpilation, minification, etc. Looking at the raw crash stack of generated code can be hard work. Here's a comparison of crash stacks for a sample file.
// sample.js
const penne = () => { throw Error(); }
const spaghetti = () => penne();
const orzo = () => spaghetti();
orzo();
// **original** output // **compiled** output
Error Error
at penne (sample.js:2:33) at r (out.js:1:82)
at spaghetti (sample.js:3:25) vs at o (out.js:1:97)
at orzo (sample.js:4:25) at n (out.js:1:107)
Today, source maps already provide the ability to produce accurate locations (filename, line number, column number) in a crash stack, but not enclosing function names. This hinders debugging and confuses automatic crash stack consolidation.
In this session, we will discuss an extension to the source map format that allows for accurate function name decoding, and we will show you how to use it yourself by demonstrating our solution, pasta
.
Note: We are planning to publish pasta
as open source in time for JSKongress.
Approximate Duration:
30 mins
Your Name:
Lilit Darbinyan
Your Company:
Bloomberg
Your Twitter handle:
lilitdarbinyan
Requirements:
[] No
[x] Yes => A projector and a USB-C adapter so I can show my supporting slide deck
Complexity:
[ ] Advanced
[x] Intermediate
[ ] Beginner