Skip to main content

Where can I view my Sentry debug logs?

Issue

I want to know where SDK debug logs appear after I enable the debug option (usually to troubleshoot events not reaching Sentry).

Applies To

  • All SaaS Customers

  • SDK Setup

Symptoms

  • I'm using an SDK with the basic option debug that I've enabled in my code base file where Sentry is initialized.

  • I'm having issues setting up my SDK and I am trying to troubleshoot why events are not being sent to Sentry.

Resolution

SDK debug logs are not shown in the Sentry UI. When debug: true (or your SDK’s equivalent) is enabled in the Sentry init function, the SDK prints diagnostic information to your local runtime whenever it initializes, captures, or sends events, or encounters issues.

Depending on your environment, you can find these logs in:

  1. Console / Standard Output: The most common location when running your application from a terminal or command prompt.

  2. Log Files: If your application is configured to write logs to files, the Sentry debug output may appear there. The exact location depends on your application and logging configuration (for example, log/development.log in Rails or specific log directories used by Java or .NET logging frameworks).

  3. Browser Developer Console: For browser-based JavaScript applications, logs appear in the browser's Developer Tools console.

  4. Process Manager / Container Logs: If you're using a process manager or container environment, such as PM2 or Docker, the logs will be available through the corresponding log command or interface.

  5. Android Logcat: For Android applications, debug logs appear in the Logcat section of Android Studio. If you're running React Native with react-native run-android from a terminal, you can also see them in that terminal.

  6. iOS Xcode Console: For iOS applications running through Xcode, debug logs appear in the Xcode console when using either a simulator or physical device. If you're running react-native run-ios from the terminal, the logs will appear in that terminal instead.

Example output may look like:

[Sentry] Debug mode enabled [Sentry] Successfully initialized SDK [Sentry] Capturing event: { …event details… } [Sentry] Sending event to https://[email protected]/12345

To attach these logs for Support, see How do I send my debug logs to Sentry?

If you want application logs inside Sentry, that's a separate feature: Structured Logs, which can be accessed under Explore → Logs. The SDK debug option does not send its diagnostic output to the Sentry UI.

For more information, see the SDK options.

Did this answer your question?