I want to find how many System.Debug lines are there in sandbox environment. As System.Debug statment is Consider in Apex character limit count.

So Is there any tool or any method such as Tooling API or SOQL query to find number lines for Syste.Debug statement?

1 Answer 1


This can be done in Developer Console, "Edit" Menu > "Find in files.."

Or you can use this chrome extension https://chrome.google.com/webstore/detail/salesforce-advanced-code/lnkgcmpjkkkeffambkllliefdpjdklmi

this extension is then shown on Salesforce classic setup page, where you can search.

Or online IDE aside.io also provides the search feature. If you consider working on your local machine, there are many IDEs providing the search feature like VSCode, Eclipse etc!

  • 1
    +1 Also the Developer Console can do this search in "Edit > Find in files..."
    – sfdcfox
    Commented Mar 5, 2019 at 9:18
  • Thanks Aditya, But my requirement is to get a all the System.Debug line from all the classes in the sandbox, not particular to single class/code.
    – amit patil
    Commented Mar 5, 2019 at 10:55
  • @amitpatil Replied for the same, you will be getting all the occurrences of System.debug in all files (listing different files), not in any particular apex file, like prntscr.com/mti9l0 is from chrome extension which gives just the file name, and prntscr.com/mtiauv from VSCode which gives every occurrence in each file. Or am I misunderstanding something? Commented Mar 5, 2019 at 12:10
  • @sfdcfox I was suggested to update my answer with your comment, updating it, thanks! :-) Commented Mar 8, 2019 at 5:20

You must log in to answer this question.

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