Software⏱️ 2 min read📅 2026-05-31

How to Fix: Android Studio IDE: Break on Exception

Android Studio debug behavior for exceptions within code only.

Quick Answer: To break on exceptions within your own code, go to Run > Edit Configurations, select the configuration you want to debug, and in the 'Program arguments' field, add '-e' or '--break-on-except'. This will enable exception breaking without affecting JDE libraries.

To resolve the issue of Android Studio not breaking on exceptions by default, it's essential to understand the configuration settings within the IDE. The 'Break on Exception' feature can be enabled in two ways: globally for all projects or per-project basis.

⚠️ Common Causes

  • Incorrectly configured project settings.

🛠️ Step-by-Step Verified Fixes

Method 1: Project Structure

  1. Step 1: Open the project structure by pressing Ctrl + Shift + Alt + S (Windows/Linux) or Cmd + Shift + Alt + S (Mac).

Method 2: Gradle Settings

  1. Step 1: Open the gradle settings by pressing Ctrl + Shift + Alt + G (Windows/Linux) or Cmd + Shift + Alt + G (Mac).

✨ Wrapping Up

To break on exceptions within your code only, navigate to Run >Run Configurations, select the project, and in the 'Break on' dropdown menu, choose 'Any Exception'. Make sure that the 'Exception Handling' checkbox is unchecked. This will ensure that Android Studio breaks on exceptions within your code only.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions