Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 670747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:17:52+00:00 2026-05-14T00:17:52+00:00

This is but a curious question. I cannot find any useful links from Google

  • 0

This is but a curious question. I cannot find any useful links from Google so it might be better to ask the gurus here.

The point is: is there a way to make “annotation” in javascript source code so that all code snippets for testing purpose can be ‘filtered out’ when project is deployed from test field into the real environment?

I know in Java, C# or some other languages, you can assign an annotation just above the function name, such as :

// it is good to remove the annoying warning messages
@SuppressWarnings("unchecked")
public class Tester extends TestingPackage 
{
    ...
}

Basically I’ve got a lot of testing code that prints out something into FireBug console.
I don’t wanna manually “comment out” them because the guy that is going to maintain the code might not be aware of all the testing functions, so he/she might just miss one function and the whole thing can be brought down to its knees.

One other thing, we might use a minimizer to “shrink” the source code into “human unreadable” code and boost up performance (just like jQuery.min), so trying to match testing section out of the mess is not possible for plain human eyes in the future.

Any suggestion is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:17:53+00:00Added an answer on May 14, 2026 at 12:17 am

    You can overwrite the Firebug console functions so they do nothing:

    console.log = function() { };
    

    You could perhaps include this into your code in your build process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This must be a stupid question, but nevertheless I find it curious: Say I
My question..not even sure if this is possible but curious from others... I have
This question has been asked in a C++ context but I'm curious about Java.
This may sound like an unusual question, but I am curious as to how
This is a really esoteric question, but I'm genuinely curious. I'm using usort for
I know this is a subjective question, but I'm always curious about best-practices in
I tried searching for this but couldn't find a similar question. I have a
Yet another IE is doing something different from other browsers question but this is
I understand that this is a very broad question, but I was very curious
This question might or might not solve my problem - but I hope to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.