Governor limits window
Although the Salesforce Apex limits, or governors, are designed to ensure that runaway Apex code or processes don’t monopolize shared resources, it's not a rare case, when exceeding such limits causes the development issues. The Welkin Suite offers you a handy way to track reaching limits during debugging your code. This option is available via the Governor limits window in the Debug mode.
To open this window, in the Debug mode of The Welkin Suite, navigate to the Main Menu:
Debug ⇒ Show Governor limits.
The Governor Limits window represents data in a table with the following columns:
- Limit name,
- Limit value — reached and allowed.
The information about the maximal limits is received from the appropriate Salesforce log file. The supported Governor Limits in TWS are the following:
Number of SOQL queriesis calculated based on number of
Number of query rowsis calculated based on the corresponding numbers written to the log file in the
Number of SOSL queriesis calculated in the same way as SOQL queries — using the
Number of DML statementsis provided from the number of
Number of DML rowsis provided from the corresponding 'Rows' part of the
Maximum heap size (approximate)is calculated using the
HEAP_ALLOCATEentries, however, this approach does not provide absolutely correct numbers, so some kind of difference about 10-15% is possible and should be taken into account,
Number of calloutsas well as most previous items is calculated by the number of
CALLOUT_REQUESTitems in the Debug Log file.
By default, all of the maximal values are related to the synchronous limits, and if you step into the asynchronous context, they can be changed in-line to the corresponding values.
Data in the 'Limit value' column changes dynamically during the execution flow. Once a step raises the value of reached limits, this information is highlighted in a red color. Thanks to this, you can trace, which limits were reached and their values, at every single line of execution flow.
In this section:
This also may be useful: