function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
34213421 

Unable to debug Self registration page on communities

 I have a visualforce page and an apex class written. I have added that as the community self registartion page in the community settings.   How do I debug the code using UI?
Amol ChAmol Ch
Hi H k,

Guest site user debug is not showing in debug log, it is related to Winter 17 change. Now need to set a special cookie from their side so that Salesforce will generate logs only when that user accesses the site. 

The debug logs are collected for site visitors who are using the Guest User license only when a public user’s browser has a special cookie.

To set this cookie via Chrome, Navigate to the Site URL,
Go to Developer tools and then to Console tab, Execute a below command to set the cookie.

If you use a .force.com domain, use this command.
document.cookie="debug_logs=debug_logs;domain=.force.com";

If you use a custom domain (for example, yourCustomDomain.com), use this command.
document.cookie="debug_logs=debug_logs;domain=yourCustomDomain.com";

You can follow the below steps to set debug log. :
Setup > Monitoring > Debug Log  > Site Guest User

In debug log there is a User for every site and name of the user like"Site Guest User, Name of Site" So you need to set debug log for site Guest User.

For more help you can refer the below reference document.

https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_forcecom_debugging_guest_user.htm

Mark it as a best answer if it solved your problem