1

I know that it has a lot of trends created about this topic but none of them worked for me.

So, I opened my site and create the cookie with

document.cookie="debug_logs=debug_logs;domain=.force.com";

Where i'm suppose to see it? I configured in my "Monitoring -> Debug logs" the guest user. When I try to open the page on my site to get the log and refresh the Logs page, there is nothing... Could someone please help me?

4
  • Are you using a custom domain for the site? If so, you would need to set that cookie to that domain rather than .force.com. Feb 6, 2017 at 23:32
  • Also, use the network tab in the Chrome Developer tools to confirm that the cookie gets sent in the GET request to Salesforce. Feb 6, 2017 at 23:34
  • Hey Daniel, thank you for your replay, but still not working. Feb 7, 2017 at 22:14
  • Can you add some screenshots showing the Chrome request with the cookie to the public site? Also check that the TraceFlag is active for the Sites guest user so the logs will be generated. Maybe check the Debug levels. Feb 8, 2017 at 0:23

1 Answer 1

1

To show debug logs of a Public Site:

  1. With your browser: navigate to your public site page.
  2. Open your browser's DevTools (e.g. F12 for Chrome).
  3. Paste document.cookie="debug_logs=debug_logs;domain=.force.com"; into the Console. Use document.cookie="debug_logs=debug_logs;domain=yourCustomDomain.com"; if you have a custom domain.
  4. In Salesforce: navigate to Setup -> Environment -> Logs -> Debug Logs
  5. Create a debug log for your public User (Site Guest User)
  6. Open Developer Console (or other log viewer of your choice)
  7. In the top-left menu: open Debug dropdown and disable Show My Current Logs Only
  8. Click on Logs tab at the bottom-left of the Developer Console.

Now, with these steps done, you will see the requests from the Public Site in the list of logs.

You must log in to answer this question.

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