Newer Version Available

This content describes an older version of this product. View Latest

Debugging JavaScript Code

Enable debug mode to make it easier to debug JavaScript code in your Lightning components.
Available in: Enterprise, Performance, Unlimited, and Developer Editions

By default, the Lightning Component framework runs in PROD mode. This mode is optimized for performance. It uses the Google Closure Compiler to optimize and minimize the size of the JavaScript code. The method name and code are heavily obfuscated.

When you enable debug mode, the framework runs in PRODDEBUG mode by default. It doesn't use Google Closure Compiler so the JavaScript code isn't minimized and is easier to read and debug.

To enable debug mode:

  1. From Setup, click Develop | Lightning Components.
  2. Select the Enable Debug Mode checkbox.
  3. Click Save.