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
SureshSuresh 

Logs are not displaying in developer console while executing the code in Anonymous window

Hi,

I have tried all ways searched in google but still couldn't get it. Can i know whats the reason
Best Answer chosen by Suresh
lakslaks
If it still doesn't work for you.

Go to Setup -> Monitor -> Logs -> Debug Logs

Add your User name under "Monitored Users".
The log should appear under the Debug Logs section once you have executed the code.

If the above resolved your issue kindly mark it as the Solution.

Regards,
Lakshmi.

All Answers

lakslaks
Hi Suresh,

The log for code executed in the Execute Anonymous window is displayed in the Developer console itself.

For example:
User-added image

Log displayed:
User-added image

If the log doesn't open after execution check under the Logs tab at the bottom as shown above.


Regards,
Lakshmi.
lakslaks
If it still doesn't work for you.

Go to Setup -> Monitor -> Logs -> Debug Logs

Add your User name under "Monitored Users".
The log should appear under the Debug Logs section once you have executed the code.

If the above resolved your issue kindly mark it as the Solution.

Regards,
Lakshmi.
This was selected as the best answer
SureshSuresh
Hi,

But in that case only 20 log requests  are allowed . isn't there any permanent solution to get logs displayed when the code is executed

Thanks and Regards,
Suresh.
BDatlaBDatla
Hi Suresh,

There is no solution otherthan adding the user to the Monitored user section.You can always reset the log request count.
Just to clarify ,suppose if it happens every time code executes the logs will take moresize than your actual database size thats why salesforce set a limit to the logs so that whenever we need to investigate we can check logs and avoid saving to many on logs in database.

Regards,
BDatla