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
-
letanque364yWho the fu.... why would that be allowed to happen? That's like selling a car with a quarter of the tools used to build it in the trunk.
-
Hazarth94844yWhat we do is add a var debug = true/false
And then
If (debug) console.log()
Logs are useful, you never know when you break some old logic somewhere or if the backend suddenly stops working and having these debugging lines ready can help.
My philosophy is to keep as much debugging information in the code as possible, but to be able to switch it off or on like on backend.
Im not a FE dev myself, so maybe theres a library for it? Breakpoints are cool, but they don't show you the entire flow of the runtime, and navigating the stacktrace is slower in most cases.
Sometimes you don't want to take out the drill if the screwdriver is already on the table
My team still use console.log for debuging instead of breakpoints, I don't really care about it when the code in development, but I really hate it when it goes to production.
I search in the project and found total 231 of console.log with allow console rules above it, I mean why don't you just delete it after the code is working, it's not that hard rather than to delete all console before goes to prod.
rant
javascript