Delete all debug logs in Salesforce

Delete all debug logs in Salesforce programmatically.

At times when you try to run Ape code and access the debug logs you might not be able to find them.

It's because of the governor limit that restricts the platform showing up the debug logs.

In case you want to solve this problem here are the steps you need to take.

  • Log into your Org
  • Open up the Developer Console
  • Click on Query Editor
  • Run this query
SELECT Id, StartTime, LogUserId, LogLength, Location FROM ApexLog
  • It's going to show you all the logs, select all of them using shift and scrolling.
  • Finally click on delete rows.

Subscribe to Salesforce Casts

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe