3 ms·
This is a case of bad defaults - why should a developer be required to write code, even if it is a one liner, to _disable_ debug? It should be the other way aro
by blinkingled 10y ago
This is a case of bad defaults - why should a developer be required to write code, even if it is a one liner, to _disable_ debug? It should be the other way around - you write a single liner to enable debug.
- BinaryIdiot 10y agoCorrect. Debug options should never be a default. They should be enabled explicitly through the act of debugging (perhaps a flag somewhere in your web app, etc). I'm guessing it is the way it is for simplicity so someone can debug without trying to figure any of this out.
- hinkley 10y agoIt should be on for test and dev builds, and off for production.
- kylemuir 10y agoThat particular flag wasn't released until version 1.3 so by opting in rather than out it wasn't released as a breaking change. When it was released and we tried to use it, it broke our site entirely due to third-party libraries we were using.
- megablast 10y agoJust another reason to hate angular.
- __derek__ 10y agoThat's not just Angular. From the React README[1]: > Note: by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. > To use React in production mode, set the environment variable NODE_ENV to production. A minifier that performs dead-code elimination such as UglifyJS is recommended to completely remove the extra code present in development mode. [1]: https://www.npmjs.com/package/react https://www.npmjs.com/package/react