Eclipse Conditional-Breakpoint. How to check if exception occurs?

后端 未结 3 1093
庸人自扰
庸人自扰 2021-01-14 00:20

I have this function:

public static FradId readFradId(DataInput pIn) throws IOException {
    Integer lMainId = Integer.valueOf(pIn.readInt());
    Integer l         


        
相关标签:
3条回答
  • 2021-01-14 01:01

    did you try something similar?

    public static FradId readFradId(DataInput pIn) throws IOException {
        Integer lMainId = Integer.valueOf(pIn.readInt());
        Integer lReferenceId = Integer.valueOf(pIn.readInt());
        try{
            String lShortname = pIn.readUTF();
        }catch(Exception e){
           //need a breakpoint here.
        }
        return new FradId(lMainId,lReferenceId,lShortname);
    }
    
    0 讨论(0)
  • 2021-01-14 01:03

    Yes there is a option called "exception breakpoint"
    Open Breakpoint view, click on j! option and add desired exception

    enter image description here

    0 讨论(0)
  • 2021-01-14 01:03

    I think you need Java Exception Break Point

    In you eclipse open the 'Add Java Exception Breakpoint...' from Run Menu. You can chose the exception for which you need to have the breakpoint.

    Run -> Add Java Exception Breakpoint...
    
    0 讨论(0)
提交回复
热议问题