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
Ken KoellnerKen Koellner 

Heap DUmp in Apex Test

Anyone know if there's a way to set breakpoints and get Heap Dumps when running an Apex Test?


I've tried ti with no luck.  I open Dev Console, when the Repository, selected the module and put a couple break points in.  Then I tried kick off the test but in another window and also in the Dev Console.  I never got any Heap Dumps in the Heap Dump tab.


Anye clue?

Thiyagarajan SelvarajThiyagarajan Selvaraj

System.debug('Heap :' +Limits.getHeapSize());


You can use this in your methods to get the heap size.

Ken KoellnerKen Koellner

Heap size and heap dump are completely different things.


Heap DUmp is a feature of the Dev Console.