Question

While debugging if you press F6 you move from one line to the next one. This is usually a good thing. The problem arrives when the next step is within a decompiled class (I am using JD-Eclipse to decompile classes). The code of that class is sometimes as follows

(686)    /*      */     }
(687)    /*  967 */     boolean recordDeleted = false;
(688)    /*  968 */     for (String guid : guidLst)
(689)    /*      */     {

The debugger knows that you are on the line 687 and places the green cursor there, but that is not the actual line of the class; in this case it would be 967. Then I have to scroll all the way up to the real line and sometimes it costs a lot of time.

Is there a way to prevent eclipse from moving me through the code?

Was it helpful?

Solution

You can decompile the class files with the option add line numbers as comments and you will be able to realign the code with JD-Eclipse, see: http://mchr3k.github.io/jdeclipse-realign/

You won't be able to decompile with line numbers if the class files are compiled with the flag -g:none:

-g:none
Do not generate any debugging information.

Also see: Eclipse skipping lines while debugging

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top