I want to debug a test method, but the debug log is mostly taken up by "ENTERING_MANAGED_PKG" lines.

In the Setting Debug Log Filters page, it suggests that this line is only shown if "Apex Code" is set to INFO or above.

I have the following in my log:


However, the ENTERING_MANAGED_PKG lines are still showing. What am I missing here?


3 Answers 3


I can confirm that this indeed happens inside namespaced packaging orgs (= the developer org of a managed package).

I have the same problem with two of our managed ISV packages. Even setting the Debug Logging Level to ERROR everywhere (assumption 1: Log reaches max size otherwise and skips my debugs) or setting it to FINEST (assumption 2: I should see more then) did not change anything.

This happened imediatelly after the Summer '13 Release.

I opened a case with Premier Support but I did not a response for weeks and regularly escalate it.

I thought I post this as an answer so I can use comments to keep you updated.

UPDATE 1: This only happends in Testclasses where I have many (20) test methods. Maybe thats the reason why the logs fills up with MUST SHOW stuff.

  • 1
    I have experienced this problem - the 2M log filling up with ENTERING_MANAGED_PKG entries and so stopping me seeing the information I needed to debug - before Summer '13. On one occasion I did get support to temporarily increase the size limit on the log as a workaround. But a change in the platform to allow this output to be suppressed is the real solution.
    – Keith C
    Aug 7, 2013 at 11:31
  • 1
    This only happends in Testclasses where I have many (20) test methods. Maybe thats the reason why the logs fills up with MUST SHOW stuff. Aug 8, 2013 at 7:50
  • Yes, sometimes in a test I have to insert a lot of objects before the actual test, and this causes the log to fill up with these objects' triggers. I don't understand why they don't just show what's between Test.startTest() and Test.stopTest() at least. But I guess that's not the main issue here
    – George S.
    Aug 8, 2013 at 13:12
  • Have you opened a case with Support? You can reference mine #09484162. Aug 8, 2013 at 14:18

This happens whenever you are looking at code that is executing inside of a managed package. It is part of the platform to protect the proprietary code of the package's developers (If you are the package's owner, you can debug it in your packaging org and see all the logging). And for security reasons so that exploits in the code are harder to discover.

PS. It's super frustrating if your managed package developer and you need to debug non-descript "Null exceptions" in remote user's installed orgs ):

  • Actually the NPEs can be debugged through License Management Organizations, though maybe you have to pay extra for that. Anyway, I am the package's owner and I am in the packaging org. It's definitely my package that is executing and not an external one.
    – George S.
    Aug 6, 2013 at 15:27
  • I'm sorry, NPE isn't a term I'm familiar with? Aug 6, 2013 at 15:28
  • Sorry, Null Pointer Exception
    – George S.
    Aug 6, 2013 at 15:32
  • If there is a way to debug managed package code remotely inside an org I would be very interested to learn more ...! Aug 6, 2013 at 15:37
  • 3
    Just Google License Management Organizations. I login, click the Subscribers tab, and get a list of orgs with my package installed. When these orgs Grant Login Access to <Your Company> Support, there'll be a login link. Accessing the org this way gets you debug logs that the client can't see.
    – George S.
    Aug 6, 2013 at 15:51

Via the idea Debug logging level that will prevent ENTERING_MANAGED_PKG appearing in the log:

Currently during unit testing in a development packaging org the log file can be completely consumed with ENTERING_MANAGED_PKG messages regardless of what the logging levels are set to.

In looking into this idea we discovered a bug where calls to some methods on the System class would generate erroneous ENTERING_MANAGED_PKG log lines. This is now fixed in Spring '18. In addition we're also changd the log level from INFO to FINE so that this doesn't cause the truncation of DEBUG level events.
- Chris Peterson

So it should be resolved now with Spring '18.

You must log in to answer this question.

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