Eclipse的Java的断点 - 的目的是什么? [英] Eclipse java breakpoints - What is the purpose?
问题描述
我与Android教程的工作,我只是到了调试部分,我想知道什么断点的目的是什么。我不能告诉,只是还没有...它实际上是停止的应用程序,所以我可以肯定它运行,直到这一点,我也可以设置多个断点,并利用它们作为标记从断点走走停停,以检查断点我的code?
I'm working with the Android tutorial and I just got to the debugging section and I'm wondering what the purpose of a Breakpoint is. I can't tell just yet... is it actually stopping the app so I can be sure it runs up until that point, or can I set multiple breakpoints and use them as markers to "stop and go" from breakpoint to breakpoint checking my code?
推荐答案
断点是执行停止的地方,你就可以开始检查当前形势下在调试器。这包括:
A breakpoint is a place where the execution stops, and you can start inspecting the current situation in your debugger. This includes:
- 点实际上已经达到了
- 所有变量的当前值
- 要手动更改所有变量的能力
- 当前堆栈跟踪 - 即哪些方法是当前的 前执行
- 要添加和执行任意code 的能力
- 来检查方法调用的结果,而不是与实际着手执行的能力
- the point has actually been reached
- the current values of all variables
- the ability to change manually all variables
- the current stacktrace - i.e. which methods were executed before the current one
- the ability to add and execute arbitrary code
- the ability to inspect the results of a method invocation, while not actually proceeding with the execution
除此之外,您可以手动向前一步,一行一行在你的应用程序。有三个选项:
In addition to that, you can manually step forward, line by line in your application. There are three options:
- 步入 - 进入这在当前行调用的方法
- 一步了 - 进入下一行
- 步回 - 从目前的方法返回(来调用它的方法)
如果你有,你想做任何上述的多个地方可以设置多个断点。
You can set multiple breakpoints if you have multiple places where you want to do any of the above.
一般来说,一个调试器是使用的System.out.println(..)
或 log.debug(非常的升级版.. )
遍,以确保一定的条件是present的地方。 (感谢BalusC这点)
Generally speaking, a debugger is a very upgraded version of using System.out.println(..)
or log.debug(..)
all over the place in order to make sure certain conditions are present. (thanks to BalusC for this point)
这篇关于Eclipse的Java的断点 - 的目的是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!