Skip to content

How to Fix IntelliJ Debugger Not Hitting Breakpoints

DodaTech Updated 2026-06-24 2 min read

In this tutorial, you'll learn about How to Fix IntelliJ Debugger Not Hitting Breakpoints. We cover key concepts, practical examples, and best practices.

The Problem

Breakpoints are set but the debugger does not stop:

Breakpoint in com.example.MyClass:42
   Not hitting during execution

Quick Fix

Step 1: Verify the debugger is attached

Run in debug mode (the bug icon), not run mode (the play icon).

Run > Debug 'Application'

Step 2: Check breakpoint status

Breakpoints should have a checkmark. A red circle with a line through it means the breakpoint is disabled.

  • Toggle breakpoints with Ctrl+F8 (Windows/Linux) or Cmd+F8 (macOS).
  • View all breakpoints with Ctrl+Shift+F8.

Step 3: Fix breakpoint conditions

Right-click the breakpoint and check:

  • Condition: Remove any conditions that may not be evaluating to true.
  • Pass count: Set to 0 or 1 if filtering is not needed.
  • Suspending: Ensure it is set to "All" or "Thread".

Step 4: Add source mappings

If debugging a library or decompiled class:

File > Settings > Build, Execution, Deployment > Debugger > Stepping

Check "Do not step into the following classes" — remove any relevant exclusions.

Step 5: Restart and clear caches

Run > Stop (or Ctrl+F2)
Run > Debug 'Application' again

If still not hitting:

File > Invalidate Caches and Restart

Step 6: Check for JIT optimization

Disable JIT inlining for debugging:

Run > Edit Configurations > VM options

Add:

-XX:-Inline -Xint

Prevention

  • Use the Debug button (bug icon), not the Run button.
  • View all breakpoints with Ctrl+Shift+F8 to see which are disabled.
  • Always run a clean build before debugging.

Common Mistakes with debugger not hitting

  1. Forgetting deriving (Show, Eq) on custom data types needed for debugging
  2. Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable
  3. Using head and tail instead of pattern matching, causing runtime errors on empty lists

These mistakes appear frequently in real-world INTELLIJ code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### Why does the IntelliJ debugger skip over my breakpoints?

The code may be compiled with optimizations, or the breakpoint is set on a line that the JVM does not execute (e.g., unreachable code, dead branches). Run a clean build and check the breakpoint location.

How do I debug a Maven or Gradle test in IntelliJ?

Click the green arrow next to the test method and select Debug. Or set a breakpoint and run mvnDebug test from the terminal, then attach the IntelliJ debugger to the remote process.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro