Eclipse-Class-Decompiler icon indicating copy to clipboard operation
Eclipse-Class-Decompiler copied to clipboard

Source code alignment without showing line numbers as comments

Open mblomenkamp opened this issue 8 years ago • 3 comments

Is there a strict reason as to why the "Align code for debugging" function is only available when the "Output original line numbers as comments" function has been enabled? If that would work without the comments the code would be much easier to read. BTW: procyon can decompile that way out of the box, e.g. on the command line using the 'stretch lines' option.

cheers, Marcus

mblomenkamp avatar Jan 11 '17 08:01 mblomenkamp

The first reason, some classes may lose the debug information, they are no line numbers and can't debug.

The second reason, some decompiled codes can't realign correctly (because eclipse java ast parses them failed), if you set break point by exception trace track, you may not find the code correspond the line number. You can only set the break point at the line number before the code, not every lines can set break point.

cnfree avatar Jan 12 '17 07:01 cnfree

+1 for separating the "Align code for debugging" and "Output original line numbers as comments" options. I successfully use Procyon with the option to align line numbers only (-sl) and the result is very good for debugging decompiled code... having line numbers added as a comment is definitively not needed and make the resulting code harder to read.

fgiust avatar Aug 06 '17 05:08 fgiust

I provide a new menu item "Debug Mode", so I recommend you don't check these options. When you need to debug, please use the context menu and check the "Debug Mode", then the code will realign the line number automatically.

cnfree avatar Aug 07 '17 01:08 cnfree