Stepping through a program

When execution is suspended, the step controls can be used to step through the execution of the program line-by-line. While performing a step operation, if a breakpoint or JavaScript error is encountered, execution suspends at the breakpoint or exception, and the step operation ends.

Tip: You can use combinations of step commands to step through multiple calls on a single line.

Step Over

To execute a step over command:

    Select a stack frame in the Debug view. The current line of execution in that stack frame is highlighted in the editor in the Debug perspective. Do one of the following:

    • Click the Step over button in the Debug view toolbar.

    • Select Run > Step Over from the workbench menu bar.

    • Press F6.

    The currently-selected line is executed and execution suspends on the next executable line.

Step Into

To execute a step into command:

    Select a stack frame in the Debug view. The current line of execution in that stack frame is highlighted in the editor in the Debug perspective. Do one of the following:

    • Click the Step into button in the Debug view toolbar.

    • Select Run > Step Into from the workbench menu bar.

    • Press F5.

    The currently-selected line or statement is stepped into and the line's next expression to be executed is invoked. Execution suspends at the next executable line in the function that is invoked.

Step Return

To execute a step return command:

    Select a stack frame in the Debug view. The current line of execution in the selected frame is highlighted in the editor in the Debug perspective. Do one of the following:

    • Click the Step Return button in the Debug view toolbar.

    • Select Run > Step Return from the workbench menu bar.

    • Press F7.

    The current execution point, up to the line immediately following the line that called the function, is executed. Execution stops after exiting the current function. If you issue this command from the main entry point (that is, in main()), the program runs to completion

 

Related concepts

JavaScript debugging methods

 

Related tasks

Launching a JavaScript debug session with the Java and mixed language debugger
Creating a new Java and mixed language debug adapter launch configuration
Running
Using breakpoints