0

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?

2

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 Mar 5 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 Mar 5 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? – Aditya Vijay Mar 5 at 12:10
  • @sfdcfox I was suggested to update my answer with your comment, updating it, thanks! :-) – Aditya Vijay Mar 8 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.