You need to sign in to do that
Don't have an account?
Ken Koellner 1
Debug Log for non-Browser (Twillo) accessing Site
I'm trying to get debug logs when a non-browser (Twillio) access VF pages implemented on Sites (that are coded to deliver XML). I'm not getting debug logs. I did some searching and found release notes from Winter '17 that say for sites guest users, a cookie must be set in order to get debug logs. That works fineina browser. I tried setting a cookie the controller constructor (see below) that delivers the page but that didn't work. Maybe because Twillio isn't sending the cookie back. And even if that might work, the call that came in would not yet have the cookie so I wouldn't have a debug log.
I haven't figured out a work around. I'm wondering if anyone else has.
I haven't figured out a work around. I'm wondering if anyone else has.
Cookie debugCookie = ApexPages.currentPage().getCookies().get('debug_logs'); if (debugCookie == null) { debugCookie = new Cookie('debug_logs','debug_logs','.force.com',300,true); } ApexPages.currentPage().setCookies(new Cookie[]{debugCookie});
Here's the winter '17 article -- https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_forcecom_debugging_guest_user.htm
So I suspect that what I tried won't work as it's creating a cookie named 'apex__debug_logs'. I don't know if there is any way to turn that offf. Also, even it it did work, until the caller (Trillio) gets the correct cookie, there will be no debug log so if it did work, I'd only get debug logs on subsequent requests.
Go to Apex Controller in salesforce and click the Trace Logs tab and create a new debug log entry and then start watching the logs