Limits information not appearing in debug log

I need to debug a governor limit issue in a particular procedure but I’m not getting the LIMIT_USAGE_FOR_NS section in the debug log even when I set Profiling to Finest.

I expect to see this in the debug log:

16:06:58.49 (49590539)|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 0 out of 100
  Number of query rows: 0 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 0 out of 150
  Number of DML rows: 0 out of 10000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 100
  Number of Email Invocations: 0 out of 10
  Number of future calls: 0 out of 50
  Number of queueable jobs added to the queue: 0 out of 50
  Number of Mobile Apex push calls: 0 out of 10

But I only get this:

11:58:58.62 (62487375)|CUMULATIVE_PROFILING_BEGIN
11:58:58.62 (62487375)|CUMULATIVE_PROFILING|No profiling information for SOQL operations
11:58:58.62 (62487375)|CUMULATIVE_PROFILING|No profiling information for SOSL operations
11:58:58.62 (62487375)|CUMULATIVE_PROFILING|No profiling information for DML operations
11:58:58.62 (62487375)|CUMULATIVE_PROFILING|No profiling information for method invocations
11:58:58.62 (62487375)|CUMULATIVE_PROFILING_END

I’ve checked the trace flags on the various classes involved and there are no flags.

I’ve tried running other procedures and also unit tests and I do get the limits section.

The only thing I can think of is that this particular procedure is invoked via Javascript Remoting, but I don’t understand how that could be a problem.

Answer

Attribution
Source : Link , Question Author : David Cheng , Answer Author : Community

Leave a Comment