debugging - JavaScript: Possible uses for #debug directive? -


Where do I work, all our javascript is run through a compiler before being deployed for a release . One of the things in this Javascript compiler (next to things like minify), is for lines of code that looks like this, and stops us from the release versions of JavaScript:

  / / # debug warning ("This line of code will not do it in the release build") // # / debug  

I do not see much, but I still have to see this // #dbug instructions to any of our javascript T is used in

This is useful utility? I fail to see that it can be a good idea and it seems that #debug instructions (whether in C # or Javascript language) is generally a sign of poor programming.

Is it a waste of time // # Functionality for debug or what?

If you were using a large JavaScript library such as YUI, there is a logger in it, in debug mode Only debug messages can be logged for display.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -