5

I am having a huge issue of debug logs not showing. In a piece of code I know for sure that is being hit I have the System.debug statement that should be printing but it's not.

If I take out the variable I am trying to see the value of it will print.

For example this prints:

System.debug('This is the value');

But this will not print

System.debug('This is the value' + val);

I am not understanding why the debug statement will not print with the variable

These are the debug levels that are set enter image description here

  • Are you getting an entry in the log saying "maximum debug log length reached?" You might need to tone down your logging level a bit. – sfdcfox Jan 4 '16 at 22:05
  • It doesn't seem to be in there. It just simply won't show the variable. @sfdcfox – TemporaryFix Jan 4 '16 at 22:16
  • What is the data type of "val"? Do you see the debug statement at all? Or maybe an exception? – sfdcfox Jan 4 '16 at 22:18
  • yikes, get rid of apex finest and use apex debug (or better yet INFO or higher) so you can avoid all this noise in the debug logs; if val is type String and of length=0, then the debug message will be This is the value – cropredy Jan 5 '16 at 1:13
2

There are variety of possible reasons you should check.

1) If the log is too big it skips portion of log and add line like :
*** Skipped XXXXXXXX bytes of detailed log

2) The variable val is empty string

3) You may have many System.debug and may be referring to wrong line number. Log shows line number with output check that.

0

To extend the answer above:

If the System.debug () entry is in a managed package, it will not show in the usual "Debug Logs" section. You would need to enable LMA (License Management App) for that package, log onto the LMA and then enable the logs for that subscriber.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.