I am spending entirely too much time trying to figure out how to surface debug statements instead of debugging my actual code and I wanted to see if anyone out there has come up with a fool-proof solution. Here's what I've tried:
When adding a debug statement, I set the logging level:
System.Debug(LoggingLevel.INFO, 'For the love of god, show up in the log!');
Then I set debug filters, which can be done in two different places with different options:
Console Settings: I'm not sure why there are two rows and I'm not sure what the Expiration means.
Also, the filtering options are different through the UI and Console. For instance, there is a 'None' option in the UI, but the least verbose setting in the Console is 'Error'. Because I've set 'None' in the UI, that shines through here on the Console, but if I were to edit those settings, I wouldn't have 'None' as an option. In any case, neither setting seems to be respected - here's the head from the debug log:
For the two places I know that I can add filters, I've set Apex Code to Info, but the head shows that I'm getting 'Apex_Code; Debug'. And I'm getting Info for nearly everything else where I should ideally get 'None' or worst case 'Error'. Whatever, right? But the problem is that my debug log reaches it's maximum size before it gets to the debug statements that have any meaning for me. Instead of debuging my code, I'm spending my day debugging Salesforce's debugging.
This has mostly been me complaining, but I do want to know, does anyone one know what's going on and how I can get the debugger to respect my filter settings?