I was facing the below error.How can i catch the below error in debug logs.will it be possible to catch it in logs.
"Maximum view state size limit (135KB) exceeded. Actual view state size for this page was 139.078KB".
Common causes of this problem:
Attachment
bodiesapex:...
tags); normally happens when using tables of data via apex:repeat
or apex:pageBlockTable
If you can't figure this out by inspecting your code for these patterns, the best way to track this down is to find a way to get your page to display without hitting the error (e.g. different inputs to the page) and then use the View State Inspector to see what is contributing to the problem.
You can't catch this error in log - since it is View State issue. View State is limited to 135KB, you just need to decrease amount of data that is displayed and/or page structure.
Please check: