π¨βπ» I have been coding for almost 15 years.
π You can find me on Github and Twitter as @tetri
π‘ I live in Cascavel (ParanΓ‘, Brasil).
πΌ I work at Datacoper Software Ltda. as System Analyst.
All this methods to debug operations could be seen by final users when console is open in released applications.
I use console.debug with all included arguments and the debug messages only appears when application is in debug mode and the level of messages from console includes Verbose messages.
Hey Tetri. You're right. These methods are just used in development for debugging and should be omitted in production code to avoid maybe giving out information that shouldn't get to the end user. I should have mentioned that.
I wasn't sure where to stick this comment. One of my favorite things to do when I visit a new tech website is to check the developer console for hidden messages. Looking at you, Reddit.
I do this all the time when surfing through the web, open console, viewing source code, finding curious things - like job offers - which seems to be one of the best placement for web development job offers :). I made a small (totally incomplete) article series (in German) out of it: dirty-co.de/category/jobanzeigen-i... ;)
While I do agree using console.log() would present information to the user via the client console once the code has reached the client, it's all accessible anyways. Security through obscurity is not security. Adding breakpoints and tracing code execution in the client is trivial now days.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
All this methods to debug operations could be seen by final users when console is open in released applications.
I use
console.debug
with all included arguments and the debug messages only appears when application is in debug mode and the level of messages from console includes Verbose messages.Hey Tetri. You're right. These methods are just used in development for debugging and should be omitted in production code to avoid maybe giving out information that shouldn't get to the end user. I should have mentioned that.
Your method is definitely better :)
I wasn't sure where to stick this comment. One of my favorite things to do when I visit a new tech website is to check the developer console for hidden messages. Looking at you, Reddit.
Nice idea! I'm actually working on a redesign of my site. I'll make sure to add something fun in the console for anyone looking around :)
I do this all the time when surfing through the web, open console, viewing source code, finding curious things - like job offers - which seems to be one of the best placement for web development job offers :). I made a small (totally incomplete) article series (in German) out of it: dirty-co.de/category/jobanzeigen-i... ;)
While I do agree using console.log() would present information to the user via the client console once the code has reached the client, it's all accessible anyways. Security through obscurity is not security. Adding breakpoints and tracing code execution in the client is trivial now days.