I'm testing my managed package (it's Beta now) trying to install it to new Dev Org. It's weird thing but seems like debug statements inside my package are not shown. Is that known bug/issue or I need to configure/enable something to show debug statements.

  • Off the top of my head, I don't remember how to do this, but I believe the only way to grant login access is to grant a login (in the dev org) for a rep from the managed package to have login access. That package admin can then view the package debugs but no User in that dev or will ever be able to see them (even system admins).
    – dphil
    Aug 18, 2014 at 18:24
  • That is normal behaviour for released managed packages so I guess for beta ones too. I usually create a case to get the debugging turned on as we get reasonable support response by paying for support. But somewhere on this site I recollect a comment that there is another way - do some searching here.
    – Keith C
    Aug 18, 2014 at 18:25
  • Re granting access via subscriber access...I think that only works for what used to be called 'aloha' apps - you can ask Salesforce to 'unmask' the logs though Aug 18, 2014 at 18:26

1 Answer 1


Debug logs raised from within a managed package are not exposed within the installing Org by default (Since Winter '12). This includes beta managed packages and full releases. See Logging from a deployed managed package.

You now need to use the LMA (License Managing Application) with the managed package to log into the Org and see the debug logs. See Subscriber Support Console and Troubleshooting in Subscriber Organizations

My experience with betas is that they usually aren't in the LMA yet as they are still in the early stages of development. I.e. they haven't been reviewed yet so can't be in the LMA.

As Keith suggests in the comments, if you have paid support you can create a case to have the debugging exposed (include your namespace and packaging org id plus a timespan for how long the logging should be exposed.). I've had zero luck with support without paid support (even for reporting platform bugs and Org specific issues). They just close cases and direct you to the developer forums. The developer forums aren't going to be much help here, as support need to access the Org to change the logging settings.

I raised the idea Expose logging from a Beta managed package in the deployed org a couple of years ago. Your vote would be appreciated. I'd really like a checkbox when making the beta managed package that indicates if I want logging exposed. Maybe a dropbox logging level to expose. I.e. Errors but not debug.

You could go so far as to implement your own logging. This is potentially expensive in terms of records and database transactions, but it will work with betas and full releases alike. You could use a hierarchy custom setting to control what is logged and for whom. You might want to consider rollback behaviours when dealing with exceptions.

  • 1
    I would like to add that debugging a Managed Beta package worked for me when there was a previously released Managed Released version of the package. You need to go through the hoops of installing LMA and granting access and such, but it does seem to work.
    – dana
    Mar 1, 2017 at 21:51
  • 1
    To add to @dana's comment, I did a fresh install of my beta package in a scratch org, this did not appear in my LMA as normal. In the scratch org I granted login access to the package publisher. Then in my LMA, I manually created a new Licence record, only populating the field sfLma__Subscriber_Org_ID__c with my scratch org's org Id. To my surprise I was then able to view the License, login to the org using "Log into subscriber console", set an apex debug trace on a user and capture debug logs from my package
    – James
    Apr 21, 2021 at 12:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .