[SalesForce] System.debug messages not showing in debug logs

I noticed all of system.debug messages are not showing up on the debug-logs, since past few days.
I even added debug msg at first line and the last line in constructor. Surprisingly, it did not displayed the first debug statement but displayed the one at last line.

Also, from 3 of my methods, I see none of the debug messages are getting displayed for 2 of the methods. however, debug messages of 3rd method are all getting displayed.
The code is getting called, no doubt since I'm getting the List/Maps whatever I'm trying to create in the methods.

I also tried adding try-catch to check if any exception is preventing the debug messages but no luck.

Seems like Salesforce issue ?
Has anyone experienced this ?

Best Answer

It seems they changed how large logs are handled. Instead of cutting them when they get to 2MB, they cut the first part and show the last 2MB (1.85 it seems). Check if you have something like Skipped xx bytes of detailed log in the very start of your log. This baffled me last week because I just used filtering to show debugs.

In any case, in filtering, you can drop anything you don't care about and leave Apex code at debug.

Related Topic