Newer Version Available
Enable Debug Mode for Lightning Components
Enable debug mode to make it easier to debug JavaScript code in your Lightning
components.
The Lightning Component framework executes in one of two modes: production and debug.
Production Mode
By default, the framework runs in production mode. This mode is optimized for performance. Framework code is optimized and “minified” to reduce the size of the JavaScript code. As a result of this process, the JavaScript code served to the browser is obfuscated.
Optimization and minification are performed on framework code only. Custom component code is
not minified or obfuscated. Untouched custom component code includes both components you
create yourself, and components installed as part of a managed package.
Debug Mode
When you enable debug mode, framework JavaScript code isn’t minified and is easier to read and
debug. Debug mode also adds more detailed output for some warnings and
errors.
As with production mode, custom component code is neither optimized nor minified.
To enable debug mode for your org:
- From Setup, enter Lightning Components in the Quick Find box, then select Lightning Components.
- Select the Enable Debug Mode checkbox.
- Click Save.