Skip to content

zdocs LWC dev notes

Jeff Hilyard edited this page Oct 22, 2021 · 1 revision

Enable Lightning Debug Mode for the Summit Events Site Guest User in a Scratch Org

You won't find the site guest user in the "Debug Mode" section of Setup, and you can't access Advanced User Details from the Site. Instead, open Developer Console and enter and execute the following SOQL in the Query tab:

SELECT Id, Alias, UserPreferencesUserDebugModePref FROM User

Then find the row for the Alias guest, which is the Summit Events Guest Site User (in a scratch org), edit the UserPreferencesUserDebugModePref cell to check the box, then Save Changes.

Salesforce Lightning Inspector

It also helps to install the Salesforce Lightning Inspector extension for Chrome which shows more meaningful error messages in the Dev Tools console than otherwise, and see the guidance in Debug Your Lightning Components | Salesforce Developers Blog to enable Custom Formatters in Dev Tools, set Pause on Exceptions to enable examining the environment that caused the Exception, etc.

.gitignore and .forceignore for LWC Development

This is an area for future discussion. LWC development generates local artifacts that should be kept out of the repo, as well as some settings that may be helpful in a shared community development scenario. Creating an LWC in Visual Studio Code using the SFDX Extensions automatically generates .forceignore entries that some developers find objectionable (issues raised in the SFDX Extensions for VS Code repo), and not everyone uses Visual Studio Code. Taking a look at other more mature LWC repositories and asking for expert input would be helpful.

Clone this wiki locally