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
Eager-2-LearnEager-2-Learn 

System.debug statements in a data factory

Hi,

I have for lack of a better word--a data factory that I call from within my test class.  I need to see the debug statements that I have in the data factory class method but when I look at the logs I do not see the debug statements that I created.  I need to see if I am building the data correctly because I am having an issue.

Is there a way to see debug statements in test classes or the data factory class/method that I call.
dev_sfdc1dev_sfdc1
Hi,
Ya its possible to see debug statements in test class as same as like apex class.

For this test class, set your debug statement wherever you need in that and run your test class and check your debug logs.

Thank You
Eager-2-LearnEager-2-Learn
I realized why I cannot see the debug statements that I am looking for!  Salesforce is reporting that the log is truncated.  I wish they allowed us to select which part to remove as the log exceeds the limit.  For example, let my define to truncate the beginning, middle or end and preselect a percentage of those areas.  I am not sure if that is possible in the middle but instead of truncating the end of the file start taking space from the beginning so I see the end of my log!