You need to sign in to do that
Don't have an account?
Some System.Debug statements not displayed in Debug Log
Dear All,
I have a particularly annoying issue with Debug statements.
Considering this piece of code:
... System.Debug('## Start request Preparation - Timestamp:' + DateTime.now().format('HH:mm:ss:SSS')); RequestPreparationResult res = prepareRequest(lstUpIds, operation); System.Debug('## End request Preparation - Timestamp:' + DateTime.now().format('HH:mm:ss:SSS')); ...
In the debug log window, I can easily find the 'USER_DEBUG|[450]|DEBUG|## End request Preparation - Timestamp:12:36:58:525'
statement but I am unable to find the first one ('## Start request preparation').
In fact, all System.Debug statement after the 'End request' one are displayed but all those before the 'Start request' one (included) are not displayed.
Is anyone aware of limitations regarding System.Debug statements or anything that can prevent my statements to be displayed????
I really need help on this one. Thanks in advance. Best Regards
Hi AWL-CRM,
I do not think that there is limit in system.debug in salesforce, and its unusual if you are unable to see the first debug statement in the system log. You should run the debug log again and cross check the debug statements , may be this is happening due to exception in the source code.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks for your answer Ispita_Navatar,
Unfortunately your answer does not help me much or maybe it does I don't know. Let me be clearer.
He re is a sample of my code:
And here is what I get in System Log for two different executions (as you can see execution is basically based on a loop on some Contacts).
-- First, an execution with only one Contact:
As we can see everything is fine.
--Second, an execution with 48 Contacts:
3 Different remarqs regarding this log:
-- I can only find 22 contacts from my 48
-- It seems I am missing all the first statements (Reprovisioning List, Start request preparation, operation and some Contacts)
-- As we can see with the line ## End Provisioning, error, I do have an exception catched (in fact it is due to the size of the message I try to send wia callout, but whatever).
As the exception is catched after statements at the beginning , should not they be displayed? Is it linked anyway?
Hope it can help you find out why it is not working fine !!
Thanks in advance.
Best Regards