9

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 '14 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 '14 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 – Phil Hawthorn Aug 18 '14 at 18:26
9

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.

| improve this answer | |
  • 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 '17 at 21:51

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.