Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I like doing it as stupidly as possible.
works in JS.
debug = function (msg, status) {
let currentStatus;
if(status === 0) {
currentStatus = "[+]";
} else if(status ===1) {
currentStatus = "[*]";
} else if(status === 2) {
currentStatus = "[!]";
}
console.log(currentStatus + " " + msg + "\n");
} -
Nothing wrong with simplicity 🤷♀
Powerful debugging tools often have side effects as well. Some make your code slow, or interact with code in unpredictable ways... so if some dump or log statement works for your purposes, why not.
One trick I find essential though is to add some kind of test to the CI/deployment which fails if debug statements are present. -
Print("ass")
...
Print("butts")
...
...
Print("big butts")
...
...
...
Print("asses")
...
Print("ass butt")
Related Rants
Debugging
joke/meme
test
print
debug