mahesh babu
mahesh babu

Reputation: 45

Java breakpoint, annotated with a crossed out T, fails to trigger in Eclipse

enter image description here

Can not get variable value in debug view and eclipse can not stop execution at breakpoint

import java.io.*;
import jxl.*;

public class Excelread {
    public static void main(String[] args) throws Throwable {
        String Filename = "C:\\library\\TestData.xls";
        String Sheetname = "Source";
        String[][] arrayExcelData = null;
        FileInputStream fis = new FileInputStream(Filename);
        Workbook WB = Workbook.getWorkbook(fis);
        Sheet SH = WB.getSheet(Sheetname);
        int TotalCol = SH.getColumns();
        int TotalRow = SH.getRows();
        System.out.println(TotalCol + " " + TotalRow);
        arrayExcelData = new String[TotalRow][TotalCol];
        for (int i = 0; i < TotalRow; i++) {
            for (int j = 0; j < TotalCol; j++) {
                arrayExcelData[i][j] = SH.getCell(j, i).getContents();
                System.out.print(arrayExcelData[i][j] + "\t");
            }
            System.out.println();
        }

    }
}

Upvotes: 1

Views: 689

Answers (1)

user8097737
user8097737

Reputation:

Andreas has already answered the question, your Problem is cause by a Trigger Point.
(These are introduced in Eclipse Oxygen)

In your workspace is at least one breakpoint defined as a Trigger Point (Icon: Trigger Point Icon), therefore all other breakpoints (Icon: Suppressed Breakpoint Icon) are suppressed as long as no Trigger Point is hit.

Unfortunately you have probably defined somewhere in your workspace a Trigger Point which is never triggered (or not before the other breakpoints) so eclipse would never stop.

To fix this you can disable all Trigger Points or remove all breakpoints and only set those which you really need.


Here is a example for a misused Trigger Point: Workspace with unreached Trigger Point

As you can see the Breakpoint on line 10 is defined as a Trigger Point but is in a private method which is never called, therefore the Breakpoint at line 6 will never stop the program.

Now we just disable the faulty Breakpoint at line 10 and eclipse will stop as intended on line 6.

Workspace with unreached disabled Trigger Point


Also read Debugging the Eclipse IDE for Java Developers for the new debugging functions in Eclipse Oxygen.

Upvotes: 5

Related Questions