I have VF single page application and its controller. If I login to Salesforce and click on the "Preview" button of the VF page then I will be able to see my System.debug('...') messages gets created when I executed through the VF page. I am seeing this logs in Developer Console logs.
However, if I browse the same VF page via a custom Site domain URL (or in another word this is how guest user would use) then I am no longer see any System.debug('...') message generated whenguest user` execute through the page.
I have tried this thread's suggestion by doing like what it said but I don't see any logs created.
Go to Monitoring>Debug log.
Where you would normally put the username, put the name of the Site.
For example: If your site is called MySite, enter MySite as the user name. Shockingly undocumented, but this gives you the debug you're looking for.
I also try to set a browser cookie in my Chrome by adding this line
document.cookie="debug_logs=debug_logs;domain=dev-mydev.cs43.force.com";
where dev-mydev.cs43.force.com is my Force.come domain. And still I don't see any logs crated when I browsed via Site URL (or guest user).
I am using Summer 17 and Winter 18 Sandboxes and I have tested this on both and none of them work.
Any help is appreciated.
userasname of the siteand what I see is that each time I open/ or refresh my site then I get a log created in Debug Log. This seems to me like a generic log that gets created each time a site is launched/ or refreshed. And I do not see any other log created following that. – CB4 Oct 14 '17 at 16:50