What is the solution to this common problem?
The day I realized that I can control this, I started using the concept. Thanks to my previous boss Kaushik Chatterjee who bring this forward for me. Concept is fairly very simple. Define a global level debug variable with default value 0. Following code will explain what I am trying to convince.
var debug = 0;
debugMessages(“I am in this function”);
Above code is pretty simple to understand the concept.
First line of code defines debug variable with value 0 i.e 0 disable/ 1 enable
function debugMessages is responsible for all debugging messages. All messages will route through this function. Inside this its checking whats the value of debug variable. If its true then show alert message or simply discard it. So you can kept the value of debug variable always true as and when working on the development version. At production level simply turn off this variable and there will be no extra debug alert/message in the application.
Applying smart use of this technique, we can achieve alot and stop client from complaining these silly points which we really dont mean too. Atleast it will remove one bug from your system as entered by client as a bug.