Skip to content

fix(anr): Skip ANR profiling while a debugger is connected - #6389

Merged
markushi merged 5 commits into
mainfrom
feat/skip-anr-debugger
Nov 4, 2026
Merged

markushi merged 5 commits into
mainfrom
feat/skip-anr-debugger

Conversation

@markushi

@markushi markushi commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

📜 Description

AnrProfilingIntegration now ignores ANRs while a debugger is connected, like ANRWatchDog already does.

Debugger detection moved behind a new internal IDebugManager on SentryOptions. AndroidOptionsInitializer sets AndroidDebugManager, and both ANR integrations use it.

💡 Motivation and Context

A main thread paused at a breakpoint is not an ANR.

💚 How did you test it?

Unit tests.

📝 Checklist

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🤖 Generated with Claude Code

@sentry

sentry Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

@markushi
markushi marked this pull request as ready for review November 3, 2026 09:12
@markushi
markushi requested review from a team and adinauer as code owners November 3, 2026 09:12
@markushi
markushi requested review from 0xadam-brown and runningcode and removed request for a team November 3, 2026 09:12
@markushi markushi added the ship-it PR is ready to merge from a reviewer perspective label Nov 3, 2026

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see this! Two quick comments; otherwise looking good 👍

@markushi
markushi requested a review from runningcode November 4, 2026 08:24

@runningcode runningcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! thanks for making it easier to test!

@markushi
markushi merged commit e1eb533 into main Nov 4, 2026
50 of 51 checks passed
@markushi
markushi deleted the feat/skip-anr-debugger branch November 4, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ship-it PR is ready to merge from a reviewer perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants