function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
debradebra 

system.debug statements not appearing in the debug log

I am fairly new to Apex Development and am trying to debug some code developed by a senior level developer.
The code is a controller extension that errors with a SOQL limit without completing so the page is not completed.

I added system.debug statements to some of the methods in the code, turned on debug for my user and many different levels of debug but my system.debug statements fail to appear in the debug logs.  Based on other detailed entries in the debug log I have confirmed that the code where I've added system.debug is being executed.

Any suggestions?   I'm probably making a very simple/common beginner mistake.

Thanks
Debra
Best Answer chosen by debra
SoleesSolees
Try adding System.debug(LoggingLevel.Info, 'Your info');

All Answers

SoleesSolees
Try adding System.debug(LoggingLevel.Info, 'Your info');
This was selected as the best answer
debradebra
Thanks for the suggestion.  Added the LoggingLevel parameter worked like  charm!
Richard DiNardo 6Richard DiNardo 6
Why do I only need the LoggingLevel.Info sometimes? I write it all the time with out the first parameter and it works fine. Today it doesn't and I have to add the first logginglevel parameter. Why is this sporadic?
 
AhmadNawazAhmadNawaz
I am still facing issue, My all code is working fine but System.debug('Text') is not displaying anything on the Debug screen. Can you please help me?