Friday, June 27, 2014

Hot to read debug logs in salesforce

There are times when we have that one buggy code and to get it sorted out we have to make our hands dirty. Reading the debug code log is a very frustrating task. If you have to do it keep the below points in mind it might help you.

1. Always search for "USER_DEBUG" chances are the may be some with logical values.
2. If the code is going in catch block search for "Exception" it will quickly show the error message.
3. The loop variables and flow will again return to the start of the execution.
4. Always read the line number in "[]" as we can quickly which line the code went in.
5. If the code debug is for trigger then remember that before events value changes are not captured in log implicitly.
6. If you have manage package with triggers then for the triggers the values will appear in separate limit log in side debug log.

Hop these tips help you get most out of debug logs.

No comments:

Post a Comment