Eclipse skips lines when debugging

I am new to java and eclipse, I tried to debug Android application on the device. This is a small project with a link to the jar file. I read similar questions, but they did not help.

I need to be able to debug the source codes of the jar file, so I linked the source codes (which I got with the decompiler), and I can go to the library source codes, so I thought I did it right. But I can not debug these source codes; in debug mode, these are skipps breakpoints (only those from the source files that are attached to the jar file), and when I try to "enter the code", it goes to random lines, skips lines when debugging.

I use the latest versions of eclipse, android sdk and jdk. I do not know what causes this problem, and I would like to know.

Thanks in advance, I hope I explained enough.

+4
source share
5 answers

The problem is that you cannot decompile class files to debug it. Since the lines of the decompiled files will be different from the original lines of the Java source code (imagine: in the real source code there are some comments and other things that will not be compiled into class files)!

So, if your Eclipse shows the current debug line 42, then it only tells you that the debugger will present you a line of code 42thin the class file. This will not match your decompiled java source file.

. . .

: Laurent B, JD-Eclipse, .: http://mchr3k.imtqy.com/jdeclipse-realign/

+1 !:)

edit2: , - g: :

-g:
     .

, : jar!

+7

, -.

, Decompile (Compile (Source)) Source ( ), . . , , :)

EDIT: , , bobbel. . jdeclipse.

+1

, F6

0

. , .

0

It shows that the source file and the Jar do not match. Try to get the correct version of Source.

0
source

Source: https://habr.com/ru/post/1526562/


All Articles