Is there anyway to log system.debug message(apex code) for a managed package im using beta version. Note:i tried capturing log for a particular user in my organisation... I could view soql execution logs and other but I couldn't view the system.debug messages from the apex code

  • HI Saravanan, and welcome to SFSE! It appears that what you're asking for is not currently possible, so you should vote on the idea. In the meantime, you'll have to come up with an alternative method of logging, such as writing to a database field or sending an email. – sfdcfox Oct 4 '16 at 6:04

As sfdcfox has mentioned, this is currently not possible. System.debug information will not be populated in the managed package. However, there are some workarounds in this situation.

One solution is to have a custom debug log object and use a text area field to track down the information you want to debug. You can create a custom setting to enable and disable the creation of such objects. So whenever you need to debug, you just enable that custom setting and the debug information will be written into the custom object. I have used this way before and it proved to be working in managed packages.

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.