step into/step out/step over的区别

来源:互联网 发布:淘宝代购手表是真的吗 编辑:程序博客网 时间:2024/06/08 02:26


step into就是单步执行,遇到子函数就进入并且继续单步执行;


step over是在单步执行时,在函数内遇到子函数时不会进入子函数内单步执行,而是将子函数整个执行完再停止,也就是把子函数整个作为一步。


step out就是但单步执行到子函数内时,用step out就可以执行完子函数余下部分,并返回到上一层函
数。

step into:进入子函数
step over:越过子函数,但子函数会执行
step out:跳出子函数  

Step Into

Executes code one statement at a time.

When not in design mode, Step Into enters break mode at the current line of execution. Step Into executes the statement at the current execution point. If the statement is a call to a procedure, the next statement displayed is the first statement in the procedure.

At design time, this menu item begins execution and enters break modebreak mode before the first line of code is executed. Not available at run time.

If there is no current execution point, the Step Into command may appear to do nothing until you do something that triggers code, for example click on a document.

Toolbar button: . Keyboard shortcut:  F10.

Step Over

Similar to Step Into. The difference in use occurs when the current statement contains a call to a procedure.

Step Over executes the procedure as a unit, and then steps to the next statement in the current procedure. Therefore, the next statement displayed is the next statement in the current procedure regardless of whether the current statement is a call to another procedure. Available in break mode only.

Toolbar button:  . Keyboard shortcut:  F11.

Step Out

Executes the remaining lines of a function in which the current execution point lies. The next statement displayed is the statement following the procedure call. All of the code is executed between the current and the final execution points. Available in break mode only.

Toolbar button:  . Keyboard shortcut:  SHIFT+F11



原创粉丝点击