Java Debugger in Eclipse: Limitation on lines of code

vishal suri :

I am working on a Java application and there are certain classes which are more than 60K lines of code. One challenge we always face is navigating thru debugger when lines cross 60K during debugging. When 60K is crossed, the debugger stops showing the code and values. One way we overcome this is to move the impacted function above 60K lines and then put the debugger again, but this process is inconvenient at times.

Question:

Where is the limitation, is it eclipse or java or something else which doesn't allow debugger to function properly beyond 60K ?

howlger :

The limitation is given by the Java bytecode format:

In the line number table, the line number is stored as an unsigned two bytes quantity (u2), which results in a maximum line number of 65 535.

Apart from that, the effective limitation is given by the people who have to read the code. 60k LOC is far too much that it would be readable code.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=20828&siteId=1