[SalesForce] return entire record set when using the Execute Anonymous Window in Dev Console

This article: Is there a way to do Like against a list of Values?, has a nifty workaround for lack of a LEFT(Column, n) function. I am able to execute a successful code snippet in the anonymous window with the following:

String[] filters = new String[]{'AB1234%','AB2345%','AB3456%'}; 
List<Tools__c> tools = [SELECT ID, Serial_Number__c, Name,Account__r.Name,Product_Family__c FROM 
Tools__c WHERE Serial_Number__c LIKE :filters];
System.Debug(tools);

Alternatively I can also swap out the System.Debug(tools); line for:

return tools;

In either case, the debug log has a VARIABLE_ASSIGNMENT event that indicates "List of size 40 too large to display". How can I execute the query and get the entire record set for a report?

Best Answer

If you are looking to get this information in a report, you can just create a Report on Tools__c with a filter where you set the operator to 'Contains' and then give the sub-strings you want to search for.

If you are trying to debug each element, I tend to debug them individually as Eric suggested in the comments. I have heard you can use JSON.serialize, which forces the entire object to get thrown into the debug log, but I have not confirmed.