Bug 275283 - Breakpoint within Debug mode moves forward when code is commented
Summary: Breakpoint within Debug mode moves forward when code is commented
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows Mobile 5.0
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-07 06:43 EDT by Jonathan Camilleri CLA
Modified: 2019-09-06 15:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Camilleri CLA 2009-05-07 06:43:08 EDT
Build ID:  M20090211-1700

Steps To Reproduce:
1. Write some code
2. Create a breakpoint e.g. at line 20
3. Comment out a block of code that includes e.g. line 20, 
   leaving out some working code e.g. starting at line 50.

Check out the breakpoint, it seems to move to line 50 in my example.

The breakpoint is expected to be disabled automatically when the user comments out part of code.  

The code snippet below is returning an error indicating that the code contains obsolete methods as well, and, I am not sure which are these methods.  It would be helpful if the error message was more specific indicating the line number of the buggy code, if there are any obsolete methods.

When trying to create a breakpoint with the following conditions the code does not break in debug mode:
1. Select Breakpoint Properties 
2. Check enabled
3. Under Enable Condition key in "1==1"
4. Under Suspend select 'condition is true' 




More information:
import java.lang.*;
public class TestOne {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		/*
		double balance = 200000.00;
		double payment = 200.00;
		double interestRate = 0.05;
		double interest = 0;
		double goal = 200100.00;
		Integer years = 50;
		
		
		while (years <= 100)
		{
			balance += payment;
			interest = balance * interestRate / 100;
			balance += interest;
			if (balance <= goal) continue;
		
			years++;
		}
		
			
		System.out.println("Cumulative balance: €" + balance + " after " + years + " years.");
		
		balance = 200000.00;
		payment = 200.00;
		interestRate = 0.05;
		interest = 0;
		goal = 200100.00;
		years = 50;
		
		while (years <= 100 && balance < goal) 
		{
			balance += payment;
			interest = balance * interestRate / 100;
			balance += interest;
			if (balance < goal) years++;
			
		}
		
		System.out.println("Cumulative balance: €" + balance + " after " + years + " years.");
		*/
		
		for (Integer count =0; count < 100; count++)
		{
			if (count == 98) continue;
			System.out.println(count);
		}
		
	}

}

NOTE: The IDE Debug perspective has to be opened.  
Navigation: Window > Open Perspective > Other > Debug.

NOTE 2: OS is Windows Server 2008 (64 bit) not the one I selected...
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:36:13 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.