Step in、Step out 和 Step Over 有什么区别? [英] What is the difference between Step in, Step out and Step Over?

查看:54
本文介绍了Step in、Step out 和 Step Over 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个项目,其中使用 Visual Studio 代码进行调试.我需要步入、步出和步过之间的一些明显区别.我看到了 vs 代码调试文档,但它没有与这些相关的详细信息.有人有想法吗?

I'm doing a project in which I used Debugging using visual studio code. I need some clear differences between Step in, Step out and Step Over. I saw vs code debugging documentation but it has no such details related to these. Anyone have idea ?

推荐答案

Step in: 表示如果有函数调用,就进入函数内部,可以看到函数是如何执行的一行一行,直到它返回,然后在函数调用后立即返回下一行.

Step in: means that if there is a function call, it goes inside the function and you can see how the function is executing line by line till it returns and you go back to the next line right after the function call.

Step over:表示如果有函数调用,它只是像黑盒子一样执行并返回结果,但你看不到函数是如何执行的.

Step over: means that if there is a function call, it just executes it like a black box and returns the result, but you cannot see how the function was executed.

退出:意味着如果您进入了一个函数,现在您想跳过查看该函数的其余部分将如何执行,您退出,函数返回.然后,返回到下一行,即函数调用之后的那一行.

Step out: means that if you have Stepped in a function and now you want to skip seeing how the rest of the function is going to execute, you Step out and the function returns. Then, you go back to the next line, that is the line right after the function call.

希望这能有所帮助:)

这篇关于Step in、Step out 和 Step Over 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆