• Ephera@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 hours ago

    I mean, you should do general logging either way, since you won’t have a debugger attached when running in production. And then you can typically scroll back in the logs, too, when the debugger has paused execution.

    What this meme is talking about, is adding ad-hoc logs to narrow down where an error occurs while developing. So, bullshit logs like console.log("1"), followed by a line of potentially bad code and then console.log("2”). Log lines which you’ll remove again when you’re done debugging…