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
Robert Jeffress 7Robert Jeffress 7 

View Debug Logs

I have a few calls to debug() in my apex code.  When users report an issue, can I access the debug logs for that occurrence or must I setup Debug for the user and have him/her repeat the process?  If I must setup Debug for the user, then way is there any concern with having debug() calls in Apex if it doesn't capture anything in the logs UNTIL we setup Debug for a user?
Best Answer chosen by Robert Jeffress 7
VinayVinay (Salesforce Developers) 
Hi Robert,

You must setup Debug for specific user and need to replicate the process.

Without setting up the logs at user level you wont be able to see any logs.

Below link is for your reference.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_debugging_debug_log.htm

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks,
Vinay Kumar