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.

Bug 151832 - Debug steps are sometimes misleading
Summary: Debug steps are sometimes misleading
Status: CLOSED WONTFIX
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-30 10:39 UTC by shadewind
Modified: 2010-04-29 09:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description shadewind 2008-10-30 10:39:33 UTC
for(ServiceInfo serviceInfo : services.values())
{
	if(type.isAssignableFrom(serviceInfo.getType()) && serviceInfo.hasServiceKey(key))
		return serviceInfo;
}

Consider debugging code snippet like the above example. When looping through it, even if the if-clause holds false, the
step cursor will "step on" the "return serviceInfo;" line anyway. This is confusing as it leads me to believe that the
if-clause actually held true when it didn't. The step cursor should land on the closing brace '}' instead if the
if-clause is skipped which would be a lot clearer.
Comment 1 Martin Entlicher 2008-10-30 15:20:45 UTC
I've reproduced the behavior. But this can not be fixed in NetBeans.
The locations where debugger stops are generated by compiler.
Comment 2 Martin Entlicher 2008-10-30 15:31:40 UTC
I've submitted a defect for javac compiler - 6765597.
Comment 3 Quality Engineering 2010-04-29 09:45:11 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.