I have a Messaging.InboundEmailHandler class that is packaged and distributed as part of a managed package. It is then configured against an Email Service in subscriber orgs.

How can I access the full debug log for the EmailToApexHandler operations when the email arrives?

I'm aware of the question Salesforce Email Service Debugging and have logged in via the LMA subscriber support login as the context user that is configured against the email address.

The EmailToApexHandler log entries are appearing as expected in the debug log, but any logging content that is generated by the managed class is hidden behind


entries. Typically the way around this is to use the LMA subscriber support login, but that doesn't seem to be working in the case of email services.

  • 1
    Did you try to delete and recreate debug log settings for the user? sometimes, if debug log settings were created before user logged in using LMA, still "limited" debug logs are shown
    – kurunve
    Feb 9, 2020 at 23:04
  • @kurunve Very odd. I've haven't had a problem getting the LMA based logs historically after completing the subscriber support login. However, in this case I did need to delete the existing TraceFlag records and recreate them to get the full managed log to appear. Do you want to post an answer along those lines and I'll accept it. Feb 10, 2020 at 0:24

1 Answer 1


Given issue occurred a lot of times before in my experience.

Based on my observations, if User Trace Flags were created before someone logs in as LMA subscriber support login, then debug logs will not contain logs message content from managed package.

In order to obtain logs, it is necessary to delete existing User Trace Flag, and recreate new one.

P.S. There is another serious conclusion, based on same set of observations. Given logs are visible to same user even if he does not log in from LMA (so just as regular user). And logs from managed package still will be saved and shown to the traced user (if he has permissions to see logs), even if user from LMA logs out, so before logging out from LMA it is wise to delete User Trace Flags and all debug logs.

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.