fushuan,

Now imagine if it was an error on like 67, but on a different file anyway. The error message should tell you the call chain, and if it doesn’t (segfault aka fuck you) you need to debug and the debugger should tell you the call stack.

ErKaf,

At a sea parks?!

Welt,

It’s a VERY WEIRD place for a fire!

gun,
@gun@lemmy.ml avatar

Line 548! is insane. I can’t even imagine a number that big.

mycelium_underground,
@mycelium_underground@lemmy.world avatar

Programming Dad jokes are so bad yet so good.

glibg10b,

LaTeX

VicentAdultman,

It’s not formated correctly. Lemmy devs, please. This is top priority fix.

glibg10b,

I’ll just leave this here

Wilzax,

Check which file is giving the error, it’s probably being thrown in an included library, not your code.

erogenouswarzone,
@erogenouswarzone@lemmy.ml avatar

Yeah, but that’s some bullshit. I want to know what line in my file is causing the error.

And they know! They know what line in your file caused the error! They know the value of all the variables when the error hit. But do they show that? Fuck no.

gusVLZ,

Just read the whole stack trace till you find a familiar file

erogenouswarzone,
@erogenouswarzone@lemmy.ml avatar

No offense, but I know how to read a stack trace, and yes locate a familiar file - if you’re lucky enough to have one listed therein.

My point is, there is no excuse for them being so terrible except that they’ve always been that way.

The important information should be brief and at the top. This is design 101. The same ideas that have driven newspaper articles and websites for as long as the two have been a thing.

You put the important stuff in big letters at the top, and the rest, if you need it, is beneath the fold.

Edit: just to drive the point home: I’m sure it’s not the packages I’ve downloaded that are causing the error, I am positive it is my code, so show me where my code had a mistake first. Then you can show me the horrible “wall of text” that is the stack trace so I can understand it better later, but 99% of the time, just seeing the line that caused the error is enough to know what the problem is.

gusVLZ,

It’s a fair point, it would help a lot, I can see a drawback when the problem is incompatibility between libs or errors inside the lib but it could be solved with a show more option.

I like your ideia, would love to see how it would work

dolle,

This regularly happens for me in Kotlin due to inlined functions

solivine,
@solivine@sopuli.xyz avatar

I love how all the comments feel the need to say how they’d solve it.

daed,

Programmers are problem solvers 🤷‍♂️

Natanael,

And problem causers

MonkderZweite,

You used a library wrong.

nnjethro,

iPhone 4 vibes

sirico,
@sirico@feddit.uk avatar

Imports be like

PeWu,

NodeJS when trying ES Module in CommonJS project:

Anticorp,

Sourcemaps. Use sourcemaps.

wreckedcarzz,
@wreckedcarzz@lemmy.world avatar

Is de_dust okay or?

uranibaba,

I prefer hostage maps.

perishthethought,

The hostage has been planted.

Anticorp,

HUMILIATION

Jumi,

Fuze has entered the chat

ezures,

Did they add him with cs2?

Player2,

No that’s coming in CS2: Siege

nickwitha_k,

FUSE has entered the chat.

erogenouswarzone,
@erogenouswarzone@lemmy.ml avatar

Can you give us an eli5 on sourcemaps?

YourAvgMortal,

Usually when code is minified, it is shipped alongside a sourcemap (*.js.map), which can be used by the browser to show you the original code.

If you get an error in the browser, you can click the error, which will take you to the network(?) tab and show you exactly where the error occurred

Anticorp,

Also when code has been compiled, or transpiled. The reason the line numbers don’t match is because all of the code is being assembled into one large package and served to whatever client uses it. So even if you don’t minify, but you’re compiling, sourcemaps will show you where the error actually occurs, instead of where it occurs in the finished product.

Natanael,

Especially if the compiler optimization options inlined code from 5 different places into one blob

TunaCowboy,

Have you considered learning how to read a stacktrace?

ZeroCool,

Jokes on you, I don’t even know how to read.

ekky43,

Damn, got us good!

erogenouswarzone,
@erogenouswarzone@lemmy.ml avatar

It is 2023 my brother in christ! We deserve better error outputs than a stack trace.

  1. Tell me what line in my file caused the error,
  2. Tell me the values of the variables involved,
  3. Then you can have the stack trace.

Why are we pretending like these error messages are acceptable in 2023?!

pingveno,

Tell me the values of the variables involved,

There be dragons! Sounds like a good way to get passwords/secrets logged.

Yawnder,

I can’t tell if that was sarcasm or not. If it was, you got me. If it wasn’t, then that’s quite a big lack of understanding of what’s actually happening.

segfault,

<span style="color:#323232;">so said EVELYN the modified DOG
</span>

(This is not just a Zappa quote, but an actual error description from the Small Device C Compiler.)

trash80,

Well, everyone knows what that means.

Pistcow,

I’m disabled

DmMacniel,

How are you disabled?

entropicdrift,
@entropicdrift@lemmy.sdf.org avatar

Leg disabled

DmMacniel,

And how did that happen, if you allow the question?

entropicdrift,
@entropicdrift@lemmy.sdf.org avatar

I don’t kno~ow

AdamBomb,

Acid

cupcakezealot,
@cupcakezealot@lemmy.blahaj.zone avatar

i too hate javascript

erogenouswarzone,
@erogenouswarzone@lemmy.ml avatar

Hey hey. JavaScript is easy. It’s when you get into virtual doms that debugging becomes a nightmare.

golden_zealot, (edited )
@golden_zealot@lemmy.ml avatar

I had this happen to someone I mentor and pointed out that they had two versions of the same file in two different paths named the same. They were running the version in the other path than they were editing lol.

ChickenLadyLovesLife,

You’re describing classic ASP except that was usually 17 different versions of the same-named file.

desmosthenes,
@desmosthenes@lemmy.world avatar

the actual error is higher up in the output usually

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmerhumor@lemmy.ml
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines