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
PrasadVRPrasadVR 

An end user is getting some error that uses apex code, what is best way to understand the issue ?

1. Asking the user to grant login access . 
2. enable debug logs for that user and ask him to replicate the issue 
Sumitkumar_ShingaviSumitkumar_Shingavi
There are 2 possible cases:
1. If end user is authenticated user then you can setup Debug Logs directly on that particular user.
2. If end user is Guest user then there is always a Gues User you will see for every Site/Community/Portal in Salesforce. You can directly setup debug logs on that guest user.

For both of the above, you need to have access inside org. (might be as System Administrator) and end user credentials if you know steps to reproduce. It will start creating Logs in Debugs Logs if you setup right user based on above 2 options.

PS: if this answers your question then hit Like and mark it as solution!