step into/step out/step over的区别

本文详细介绍了三种常用的调试技巧:StepInto用于逐行进入子函数并执行;StepOver则在遇到子函数时将其作为一个整体执行而不进入;StepOut用于退出当前正在执行的子函数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值