This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
i have 2 code samples from a twitter rest client app that while stepping thru would not show correct line in debugger; i was able to fix the stepping by modifying 2 lines in the code; the samples follow: the just below code will step to the updates++ line when the "if" fails -- rather than the bottom "}"; if the 2 "//" lines just below the "if" are uncommented the indicated stepping is correct; -------------------------------- for (StatusBean us : updatedStatusList) { if (!statusList.contains(us)) { //String s = String.format("%s (%d), at: %s:\n %s\n", us.user.name, us.id, us.createdAt, us.text); //System.out.print(s); System.out.print(String.format("\033[1;34m%s\033[0m (\033[1;31m%d\033[0m), at: \033[1;34m%s\033[0m:\n %s\n", us.user.name, us.id, us.createdAt, us.text)); statusList.add(us); /*indicates*/ updates++; } } ----------------------- somehow the line : System.out.print(String.format("\033[1;34m%s\033[0m (\033[1;31m%d\033[0m), at: \033[1;34m%s\033[0m:\n %s\n", us.user.name, us.id, us.createdAt, us.text)); --alone without the 2 lines above it which decompose the line into 2 statements messes up the debugger stepping; the line is longer than what fits in the source window's width -- in case this somehow matters
This is a compiler issue, NetBeans can not do anything about it. Debugger is stepping to lines which javac defines. I'll submit this as a defect of JDK compiler if it is not there already...
We can try to increase the priority... If you feel to, just vote, using: http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6765597
Just to mention it here as well, defect http://bugs.sun.com/bugdatabase/addVote.do?bug_id=6765597 was submitted for this problem.
*** Issue 174325 has been marked as a duplicate of this issue. ***
*** Issue 175933 has been marked as a duplicate of this issue. ***
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.