+ Start a Discussion
MagnetismMagnetism 

How to view complete list of elements in collection List<DataType> in the debug log.

I debugged a collection type List in the apex and I am expecting to see a total of 20 elements in that list. But I can see only 10 and after the 10th element there are few dots(.......) meaning that there are other elements but those are not displyed. how to view those elements as well,

Thanks.
Best Answer chosen by Magnetism
TejTej
you can iterate  them in a for loop and print each element.

for(myobject mo :mylist){
    system.debug('-------------------------------------->'+mo);

}

All Answers

TejTej
you can iterate  them in a for loop and print each element.

for(myobject mo :mylist){
    system.debug('-------------------------------------->'+mo);

}
This was selected as the best answer
MagnetismMagnetism
Tej Thanks for the workaround. But is there a way to do that in the debug log settings itself?
TejTej
where ever you put your first debug statement , include for loop just below that.and it will beprinted in your debug log