4

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.

5

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

|improve this answer|||||
5

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.

|improve this answer|||||
5

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.

|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 '16 at 11:20
3

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

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

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.