this post was submitted on 17 Jan 2026
514 points (98.3% liked)

Programmer Humor

28550 readers
869 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] marlowe221@lemmy.world 48 points 2 days ago (16 children)

This happens all the time with TypeScript. The transpiled JS that actually runs will naturally have different line numbers than the TS you wrote!

To be fair, the reported line number is usually close enough that I can find the issue without much trouble.

It’s not my favorite back end language, but it’s what everyone on my team knows…

[–] folekaule@lemmy.world 38 points 2 days ago (10 children)

This is what source maps are for. With the right tools you can debug the original source instead of the minified version.

[–] marlowe221@lemmy.world 2 points 2 days ago* (last edited 2 days ago) (1 children)

Well sure. But the error messages don’t point to those, which was what had me chuckling about this meme.

[–] MotoAsh@piefed.social 2 points 2 days ago (1 children)

They would point to the right lines if source maps were included in the build.

[–] marlowe221@lemmy.world 2 points 2 days ago (1 children)

Oh, they are included in the build. But I still get error messages that don’t actually point to the line in the TS source file sometimes.

Maybe I have something configured wrong - TS projects always include a more config files of different kinds than I see in other languages I work in - but it happens.

[–] MotoAsh@piefed.social 1 points 1 day ago

If it's only rarely, it might just be some dumb caching issue, or it can be a build ordering issue. Like you have to be careful in Rollup configs or some tasks will mangle the code before a sourcemap is generated. Otherwise iirc it may have to be turned on in browser settings, though hopefully they're on by default these days.

load more comments (8 replies)
load more comments (13 replies)