Eclipse-Class-Decompiler
Eclipse-Class-Decompiler copied to clipboard
Source code alignment without showing line numbers as 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
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.
+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.
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.