Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to print the system.debug() included the apex run by a trigger, in the Developer Console (or anywhere, i just would like to see it).

Records are changed by users, trigger run (i can see the changes), but nothing appear in the console.

I can already see 'normal' apex or anonymous code.

How can i set this please ?

Thanks in advance.

share|improve this question
up vote 5 down vote accepted

You need to use debug log

goto setup --> Logs --> Debug Logs

Here add you current user provide the

enter image description here

After adding your current user. Now Create/ update record, that will fire the trigger.

and now refresh the debug log page.. you can see all the debug logs below

share|improve this answer

Just to extend @Ratan 's answer above.

His answer works perfectly for code that is not in a managed package.

If your trigger is inside a managed package, you cannot see it that way. You would need to enable LMA (License Management App) for that package, log onto the LMA and then enable the logs for that subscriber.

share|improve this answer

try @Ratan's answer to add user in debug log. But after that if you still don't get the debug then may be your debug size is too, large and SF skip some part of it (maybe your debugs are also skiped). In that case you can Click on filter and add the filter to reduce the log size. enter image description here

As you can see i have removed everything only leave the apex part. try this it will surely help you.

share|improve this answer
@Ratan has the best answer for my main problem but this tip looks VERY helpfull. It will reduce the size AND make the log easier to read ! – Guillaume Jan 5 at 11:20

if you want to see debug log in developer console you can go to Developer console and select debug log only as shown below

enter image description here

share|improve this answer
Usefull tip, i already know it. I would like it to work in setup -> debug log ! – Guillaume Jan 5 at 11:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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