Loading

Salesforce Platform: Enable Debug Logs for Managed Packages

Veröffentlichungsdatum: Jul 27, 2026
Beschreibung

When troubleshooting issues with an installed managed package in Salesforce, enabling debug logs allows you to capture Apex execution details, error messages, and performance data specific to the package's namespace. Unlike standard debug logs, managed package logging may require a backend configuration by Salesforce Support to capture code executing inside the package's protected namespace. This article explains how to enable and configure debug logs for a managed package through Salesforce Setup, and when to escalate to Salesforce Support for deeper managed package logging.

Lösung

This article explains how to enable debug logs for a managed package installed in your Salesforce org. You will configure a debug log entry in Setup targeting the managed package's namespace user or the specific user experiencing the issue. If standard logs do not show managed package code, you will need to contact Salesforce Support to enable Managed Package Debug Logs on the backend.

Enable Debug Logs in Setup

  1. Go to Setup by clicking the gear icon in the top right and selecting Setup.

  2. In the Quick Find box, type Debug Logs and select Debug Logs under Environments.

  3. Click New to add a new debug log entry.

  4. In the Monitored User field, select the user who will reproduce the issue, or select the managed package's namespace user if available.

  5. Set the Start Date and Expiration Date for the log. Set the Debug Level to FINEST for comprehensive logging, or FINE if you want to reduce log size while still capturing managed package activity.

  6. Click Save.

Reproduce the Issue and Retrieve the Log

  1. Have the monitored user reproduce the behavior causing the issue while the debug log entry is active.

  2. Return to Setup > Debug Logs and click View next to the log entry to open the captured log.

  3. Review the log output for errors, exceptions, or unexpected behavior related to the managed package's namespace. The namespace prefix (for example, mynamespace) will appear at the beginning of class and method names belonging to the package, such as mynamespace.MyController.

When Standard Logs Don't Show Managed Package Details

Managed package code executes in a protected namespace that standard debug logs may not fully capture. If the log does not show code execution within the managed package's namespace, you will need to contact Salesforce Support to enable Managed Package Debug Logs — this option is restricted and cannot be configured directly in your org.

Open a support case and provide the following details:

  1. Org ID (15- or 18-digit)
  2. Package Name and Namespace Prefix
  3. Issue summary and what you are trying to debug
  4. Duration (for example, 24–48 hours) for which you want logging enabled
  5. Confirmation that standard logs are not showing managed package details
  6. Consent from the package provider

Once Salesforce Support confirms, Managed Package Debug Logs will be temporarily enabled. You can view and download the logs on the Debug Logs page in Setup.

Notes on Managed Package Debug Logs

Managed package code runs in a separate namespace from your org's code. When reviewing logs, filter by the package's namespace prefix to isolate relevant entries. If the package vendor needs the log for analysis, export it as a text file and share it with their support team. Log levels affect org performance — set them back to default after troubleshooting is complete.

Nummer des Knowledge-Artikels

005389423

 
Laden
Salesforce Help | Article