Ad Code

How to enable debug mode for Salesforce lightning components

How to enable debug mode in salesforce ligntning

In this blog post, you will learn how to enable or disable debug mode in the Salesforce lightning experience. Basically, Salesforce has two different modes. 
  • Production mode
  • Debug mode

Production Mode

By default, your Salesforce application runs in production mode where the framework JavaScript files are minified. 

In the minified version, JavaScript is compressed into as few bytes as possible by removing unnecessary characters, spaces, tabs, comments, and so forth which improves page load times. But we see an unreadable code format that is difficult to debug.

Debug mode

We can enable debug mode for specific users which gives
  • Unminified JavaScript in a readable format which is easier for debugging
  • Console engine warnings to identify bad patterns that are only detectable during runtime
  • Measure Experienced page time, which is the time taken to load the page in lightning (shown below)
      
Experience page time in salesforce lightning


Steps to enable the Debug Mode

Login to Salesforce and navigate to the setup

Search with 'Debug' in the quick find box and select Debug mode menu item


How to enable debug mode in salesforce lightning

Select the related checkbox of the user and click Enable button as shown in the below screenshot

How to enable debug mode in salesforce lightning

That’s it. You can start debugging your code now! 😉

And you can disable it by following the preceding steps. Uncheck the option and click the Disable button

How to disable debug mode in salesforce lightning

Any impacts on enabling this?

Yes, you may experience browser significant performance issues.  Salesforce application is slower for users who have Debug mode enabled.

Hence, enable only when required and disable when you are done with the debugging.

Hope this information helps you. Post your feedback or queries in the comments section below. Thanks for your time. 😊


A
LSO READ





Post a Comment

1 Comments