Newer Version Available
Enable Debug Mode for Lightning Components
Enable debug mode to make it easier to debug JavaScript code from Lightning components.
Only enable debug mode for users who are actively debugging JavaScript. Salesforce is slower for
users who have debug mode enabled.
| Available in: Salesforce Classic (not available in all orgs) and Lightning Experience |
| Available for use in: Contact Manager, Group,
Professional, Enterprise, Performance, Unlimited, and
Developer
Editions Create Lightning components using the UI in Enterprise, Performance, Unlimited, Developer Editions, or a sandbox. |
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 and component JavaScript code isn’t minified and is
easier to read and debug. Debug mode also adds more detailed output for some warnings and
errors.
To enable debug mode for users in your org:
-
From Setup, enter Debug Mode in the Quick
Find box, then select Debug Mode Users.
Users with debug mode enabled have a check mark in the Debug Mode column.
- In the user list, locate any users who need debug mode enabled. If necessary, use the standard list view controls to filter your org’s users.
- Enable the selection checkbox next to users for whom you want to enable debug mode.
- Click Enable.
To disable debug mode for a user, follow the preceding steps and click
Disable instead of Enable.