Is it possible to turn on Debug Mode for Lightning Components for a guest/anonymous/not signed in user?

When I go to Setup -> Custom Code -> Lightning Components -> Debug Mode, I cannot see the "Guest User" user in the list of users.

2 Answers 2


You can set the UserPreferencesUserDebugModePref field on the Guest User to enable lightning component debug mode, e.g.

$ sfdx force:data:record:update -s User -i 005... -v "UserPreferencesUserDebugModePref=true"

If you want to debug Lightning components from Client end, then you can directly open up Chrome Developer Tools by "Ctrl + Shift + I" in windows.

Then select the Sources tab and then open the component name you want to debug.

If LWC then you need to prettify the code and keep breakpoints directly here, if its aura then no need to prettify.

You can checkout this too. Debug Javascript

If the debug is on Apex side, then you can start the debug logs on "Site's Guest User : user".

enter image description here

  • 1
    Thanks, but without debug mode enabled the JS in dev tool is minified, and a bit hard to read. Was just wanting to turn the debug mode on so the JS is a bit more human readable. (but only for enable this for a guest user) Commented May 13, 2021 at 21:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .