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.


Open Governor limits window


The Governor Limits window represents data in a table with the following columns:

  • Limit name,
  • Limit value — reached and allowed.

Governor limits window


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 queries is calculated based on number of SOQL_EXECUTE_BEGIN entries,
  • Number of query rows is calculated based on the corresponding numbers written to the log file in the SOQL_EXECUTE_END entries,
  • Number of SOSL queries is calculated in the same way as SOQL queries — using the SOSL_EXECUTE_BEGIN entries,
  • Number of DML statements is provided from the number of DML_BEGIN log entries,
  • Number of DML rows is provided from the corresponding 'Rows' part of the DML_BEGIN entry,
  • Maximum heap size (approximate) is calculated using the HEAP_ALLOCATE entries, 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 callouts as well as most previous items is calculated by the number of CALLOUT_REQUEST items 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:

Last modified: 2017/02/24 11:08

footer image