System.debug(JSON.Serialize(o)) Not longer shows full string
Unfortunately, since Spring'19 in order to improve performance, Salesforce changed a way how long strings are shown in the Developers Console.
Now strings are now truncated at 512 characters in the Developer Console’s Log Inspector
In order to retrieve full log, it is needed to use Open Raw Log in Developers Console menu.
Release notes with more information – https://releasenotes.docs.salesforce.com/en-us/spring19/release-notes/rn_forcecom_developer_console.htm
Some Suggestions:
- The Apex Replay Debugger is a powerful debugging tool - Note Seems to have issues with very large debug logs.
- Checkpoints can be used to inspect objects at given points in code using the developer console.
- Apex Interactive Debugger - This has become my personal favorite debugging tool.
I always recommend using Checkpoints; this gives you an easy way to inspect the entire heap (memory). You can learn more about this in the trailhead Inspect Objects at Checkpoints. Simply open the Developer Console, open the class you want to inspect (e.g. your controller), and click on the left-side gutter for the point you'd like to set the checkpoint. The checkpoints will appear in the Checkpoints tab in the Developer Console when you perform the action.