2

I am trying to debug something here and one thing that is making it harder is that force uses several log files for the output. I click a button, request happens and multiple logfiles are generated in the developer console.

This means I have to search across several files instead of just one. Is there any way I can stop force.com doing this?

1 Answer 1

3

I highly recommend you click the Help button in the developer console. There are 9 different views and a variety of ways to filter what you're seeing, including checking the Frame box, the Executable box or using the Filter box where you can type in something like "DML" or "Assign", etc. The logging level also greatly affects the amount of info that will appear.

enter image description here

The stack section displays two tree structures of the debug log: the execution tree and the performance tree. If a for loop calls System.debug() 10 times, you see the duration of each call in the execution tree:

enter image description here

In the performance tree, the calls are aggregated so you see the total duration of every call to debug

enter image description here

If you're making calls to other classes, causing triggers, validation rules, or work rules to fire, then you're going to see a lot more appear in the console as separate blocks; particularly at more detailed logging levels. That's where knowing what level of detail you actually want/need is helpful. Too much detail can be problematic at certain stages of development.

So if you want to see fewer blocks or more readily find what you're looking for within them, I recommend you lower the logging detail level and also learn to use the filters to help you move through the logs more quickly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .