디버깅 step into vs step over vs step out 의 의미

michuchu·2022년 5월 2일
0

java

목록 보기
4/5

step into vs step over vs step out 의 차이점

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

    static void g (int x) {
->      f(x); //
        f(1); // <----------------------------------- STEP OVER
    }

    public static void main (String args[]) {
        g(2);
        g(3); // <----------------------------------- STEP OUT OF
    }
}

예를 들어 g(2)에 의해 호출된 f(x) 함수에서 브레이크포인트를 걸어둬보자.

Step into 의 경우에는 구현한 f(x) 함수 속으로 들어가(into) 구현된 함수의 첫번째 줄 로 넘어감

Step over 의 경우에는 f(x) 부분이 실행 되고 f(1)으로 넘어감

Step out 의 경우에는 f(x) , f(1)이 순차적으로 실행되고 g(3)로 넘어감

What is the difference between Step Into and Step Over in a debugger

이 링크를 번역한 것이나 다름없음,,허허
설명이 너무 잘 되있길랭,,🤓

profile
라따뚜이 인생이란

0개의 댓글