Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugger doesn't stop at source code in Intellij IDEA

I've rather strange issue that I can't resolve with Intellij IDEA. I was parsing email file with org.apache.james.mime4j package but my mail file had incompatible format of Date: header. So I created module from mime4j sources and removed mime4j jar from my disk.

I've found a place where parsing happens. When I put System.out.println("Something") there, I see it in my console. But when I put a breakpoint right on println's line it doesn't stop. (But it stops in my main() function).

Do you have any idea why this can happen? I've invalidated my cache. I use IDEA 11.1.2.

like image 879
Stepan Yakovenko Avatar asked Jul 30 '12 17:07

Stepan Yakovenko


People also ask

How do I stop debugging in IntelliJ?

Terminate a debugger sessionClick the Stop button in the Debug tool window. Alternatively, press Ctrl+F2 and select the process to terminate (if there are two or more of them).

Why is my debugger not working in IntelliJ?

To solve this, simply remove the jar of the debugged module from all modules' dependencies in the Project Structure. If you do not know which modules have the debugged module jar as dependencies, you can use some tools (Eg. Sublime Text, bash, ...) to search for the module name which is stored in Intellij *.

How do I stop a code in IntelliJ?

You can run a process with ⌃R (macOS), or Shift+F10 (Windows/Linux). To stop a process, you can use ⌘F2 on macOS, or Ctrl+F2 on Windows/Linux.


2 Answers

The thing that fixed my issue (same description) was to synchronize the sources. See screenshot below:

enter image description here

like image 35
Nir Alfasi Avatar answered Sep 28 '22 05:09

Nir Alfasi


IDEA may cache your jar and use a cached copy, double check the module dependencies, there should be no the jar dependency, only the dependency on the module containing sources.

Also try File | Invalidate Caches.

like image 143
CrazyCoder Avatar answered Sep 28 '22 04:09

CrazyCoder