How to see the execution steps of a java program

后端 未结 2 535
孤独总比滥情好
孤独总比滥情好 2021-01-25 11:12

I know that Eclipse have a function that allow us to see the steps of execution of a program.

Can anyone tell me how can I find it? I really need it to study and underst

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-25 11:39

    Executing your java program step by step you need to follow a few steps:

    • Set a breakpoint by double-clicking left of the very first line of your program, which seems to be something like public static void main(String[] args). The breakpoint looks like this -> enter image description here
    • Open your program in the enter image description here view. (in the standard layout this could be found in the top right corner of your eclipse ide)
    • Start running your program in debug mode enter image description here (in the standard layout this could be found in the toolbar at the top of your eclipse ide)
    • Now you can easily navigate through your program by using the F5-F7 buttons or clicking these icons in the top toolbar enter image description here

    For deeper insight look at the tutorial Here

提交回复
热议问题