Find your content:

Search form

You are here

Capture Stack Trace in Managed Package

 
Share

Can you capture and store stack trace information in a managed package? This page says that the idea was delivered, but that's not what I'm seeing.

The same code stores this stack trace in the unmanaged version:

 Stack Trace:
    Class.PMT_PaymentCreator.<init>: line 107, column 1
    Class.PMT_Payment_TDTM.run: line 48, column 1
    Class.TDTM_TriggerHandler.runClass: line 118, column 1
    Class.TDTM_TriggerHandler.run: line 68, column 1
    Trigger.TDTM_Opportunity: line 34, column 1

And this one in the managed one:

 Stack Trace:
   (npsp)

I'm using the getStackTraceString method from the Exception class.


Attribution to: ceiroa

Possible Suggestion/Solution #1

You need to be an ISV and login to the customers org using Subscriber support to see any logging from the managed package, including the stack trace.

See comments on Capturing process information with Apex


Attribution to: Daniel Ballinger

Possible Suggestion/Solution #2

In addition to the ISV subscribers console method posted by Daniel backline support is technically able to "unmask debug logs" for a managed namespace temporarily which will expose this info. You'll need consent from the package author (if it's not you) to make this happen.


Attribution to: ca_peterson
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31825

My Block Status

My Block Content