Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix Intellij debugging problems?

I am trying to switch to over to Intellij but when I load up my projects the debugger appear to be skipping lines and not tracking the actual source when I try to step through. I know this is a vague problem but does anyone know about issues that cause Intellij to link improperly to source code when debugging?

like image 491
jkarm Avatar asked Nov 09 '11 21:11

jkarm


1 Answers

The only thing I can think of is that the current compiled classes don't match the Source you're using to debug. What happens in this circumstances is that IntelliJ (or any other IDE), gets the debug information from the classes, regarding things like line numbers, and then maps it to the current source you're viewing, to show you what code is being executed.

If the code is outdated, or the versions (the source code and the compiled class) mismatch in any way, it can happen that the debugged is giving the IDE information to show a certain line, but that information is not correct giving the current source code, which might cause what appears to be the debugged "jumping" lines or simply stopping in places that don't make much sense.

Have you rebuilt your project? Are those sources from classes in a Jar, and are you sure the versions match?

Hope it helps!

like image 188
pcalcao Avatar answered Oct 04 '22 05:10

pcalcao