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

  • SEARCH
  • Home
  • 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 6660253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:07:56+00:00 2026-05-26T02:07:56+00:00

This is primarily for the purpose of deploying to a production environment. A solution

  • 0

This is primarily for the purpose of deploying to a production environment.

A solution that parses the JS file into an AST and then removes the console calls is preferable, but I’m willing to look at altneratives.

I’m especially interested in ones that can remove console.assert calls.

  • 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-26T02:07:57+00:00Added an answer on May 26, 2026 at 2:07 am

    I handle this two ways:

    1) I never use console.log() or any console calls in my code. For debugging purposes, I have my own debugging object with it’s own methods. I can then control with a single setting whether console messages go to the actual debug console, go to my own textarea object or do nothing. Thus I can turn them on or off or redirect them with one line of code.

    2) I wrote my own python script that search my JS files for my own debugging calls and removes them. It also removes all comments, but does not minimize the file so it’s still fully debuggable. This is my “pre-production” or “beta” version of the code that I can freely let out in the world and it’s easy to track down problems in, but it doesn’t have all my comments and notes in the code. This particular python script isn’t super general purpose so I haven’t made it publicly available, but it wasn’t hard to write.

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

Sidebar

Related Questions

This should be simple enough, and I blame this primarily on my inexperience working
This is primarily a question of possibilities more than instructions. I'm a programming consultant
I'm primarily interested in pgsql for this, but I was wondering if there is
I am having trouble wrapping my mind around primarily RequireJS. I see that it
The focus of this question is primarily to develop a relational db scheme given
I am sorry if it defeats the purpose of this forum, but I see
I have an executable that is started by a windows service, this program will
I wish that I had a more precisely descriptive title for this question, but
Let's say that I'm considering designing a WCF service whose primary purpose is to
inside of my Zend_Db_Table_Rowset Object i found this: [_primary:protected] ... does anybody if theres

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.