Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.17 KB

Debug.md

File metadata and controls

48 lines (32 loc) · 1.17 KB

Debug practices

Debug steps diffrences

How debug step into, step over and step out works?

public class testprog {
    static void f (int x) {
        System.out.println ("num is " + (x+0)); // <- step into
    }

    static void g (int x) {
->      f(x); // <----------------------------------- current location
        f(1); // <----------------------------------- step over
    }

    public static void main (String args[]) {
        g(2);
        g(3); // <----------------------------------- step out of
    }
}

For more details. see here.

Debugging conditional breakpoint

  • Android studio

    Right click on a breakpoint and enter condition.

    AND_DEBUG

  • Xcode

    1. Right click on a breakpoint
    2. Then click Edit Breakpoint and enter condition

    IOS_DEBUG

    Note: Action and Options used for logging and auto execute the breakpoint. In Actions, more actions are there.

  • Visual studio

    1. Right click on a breakpoint
    2. Then click Edit Breakpoint and enter condition

    IOS_DEBUG