+ Start a Discussion
EulogioGalloEulogioGallo 

Debug Log Trace Flags Not Working

I've used the Debug Logs in the past without any issue, so it's strange that this would pop up seemingly overnight.  No Users or Apex classes that I try to log are showing up in my Debug Log history.  I know something is happening because the user I'm trying to log is making changes to records that aren't being captured in debug logs.

This is a huge issue for us as I effectively can't continue development without being able to see what I'm doing!  Any advice is appreciated, thanks!


Eulogio

Best Answer chosen by EulogioGallo
EulogioGalloEulogioGallo
You can only capture debug logs for a Guest User if the browser being used has a specific cookie enabled.

I use this Chrome extension to modify cookies: http://www.editthiscookie.com/

Then I add the following Name/Value cookie: debug_logs/debug_logs

Now if you have logging turned on for your guest user and this cookie on your browser, you should see your debug logs getting populated.

All Answers

Zaid DarbarZaid Darbar
Your debug log time must have been expired.

follow these 2 steps

1) User-added image
go to debug log as highlighted and click edit beside your name 

2) 
User-added image

enter today's date and time in start date and set expire date as next week's

let me know if this do not work for you and mark this answer :) 
EulogioGalloEulogioGallo
Hi Zaid,

I appreciate the response, but I can assure you this is not the issue.  Trace flags have been set correctly, but the debug logs just aren't showing up at all.  I contacted SF support and was told to come here for help.  My issue is that I'm setting trace flags up correctly (verified by SF support), but the logs simply aren't populating.  And it isn't that there are huge logs and some debug statements aren't being written, it's that there are no logs being recorded at all.  I have years of experience working with this so it's very bizarre that it suddenly doesn't work anymore.

Hope this helps in clarifying my problem.


Thanks!
Eulogio
Gordon EngelGordon Engel
If you are logging Guest user activity, there's a change in the logging behavior.  We made it more difficult to log guest activity because some orgs turn on logging and blow up their logs when they forget to turn it off.

https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_forcecom_debugging_guest_user.htm#rn_forcecom_debugging_guest_user
EulogioGalloEulogioGallo
Hi Gordon,

I have added the cookie this article suggests, but it still does not log any activity for me.  Here is a screenshot so you can see how strange this is:

User-added image

No debug logs are populating AT ALL, for users or Apex classes.  This may be related to the guest user debugging article you sent me, but I was just debugging a few days ago without any issue so I find this strange.  Hope this helps.


Thanks!
Eulogio
Gordon EngelGordon Engel
Keep in mind that we upgraded NA6, NA7, NA8, NA17, NA18, NA22, NA28, NA29, NA31, NA38, EU5, and EU11 to Winter '17 over the weekend.
EulogioGalloEulogioGallo
I’m on NA6, that would explain why this is happening. I verified that Guest Users are the ones that aren’t being logged, regular SF users are getting logs just fine. Thanks for the heads up! Do the same logging limitations that apply to Guest Users also apply to Apex Classes? My trace flags on these haven’t been working at all and I wonder if it is because the fact that it’s a Guest User using the Apex class I’m tracing is what’s causing this.
Gordon EngelGordon Engel
It would apply to the Apex Classes if they were invoked by Guest Users. 
EulogioGalloEulogioGallo
Thanks Gordon, you’ve been very helpful! Last question: do you know if there’s any way to deactivate this feature?
Gordon EngelGordon Engel
No, it can't be deactivated.  You could try creating a non-guest user just for debugging.
SivarajanSivarajan
Gordon,

we are on NA2, it does not create any debug logs for Guest user after adding scripts in console. Any help much appreciated.

Thanks.
EulogioGalloEulogioGallo
You can only capture debug logs for a Guest User if the browser being used has a specific cookie enabled.

I use this Chrome extension to modify cookies: http://www.editthiscookie.com/

Then I add the following Name/Value cookie: debug_logs/debug_logs

Now if you have logging turned on for your guest user and this cookie on your browser, you should see your debug logs getting populated.
This was selected as the best answer