When working with breakpoints in Eclipse I sometimes notice that they have different icons / annotations (markers on left sidebar). Sometimes it's just a blue ball, sometimes it has a checkmark on it and sometimes it is crossed. What do all these annotations mean?
在Eclipse中使用断点时,我有时会注意到它们有不同的图标/注释(左侧边栏上的标记)。有时它只是一个蓝色的球,有时候它上面有一个勾号,有时它会被划掉。所有这些注释意味着什么?
5 个解决方案
#1
131
- blue ball: regular breakpoint, active (possibly with a hit count set)
- 蓝色球:常规断点,活动(可能设置命中数)
- empty ball (i.e. white): breakpoint has been disabled (remove checkmark in the breakpoint view, or
disable
in context menu) - 空球(即白色):断点已被禁用(在断点视图中删除复选标记,或在上下文菜单中禁用)
- diagonal line through breakpoint: all breakpoints have been disabled (button
skip all breakpoints
in breakpoint view) - 对角线到断点:所有断点都被禁用(按钮跳过断点视图中的所有断点)
- question mark next to breakpoint: a condition is active for this breakpoint (look under properties of the breakpoint)
- 断点旁边的问号:此断点的条件有效(查看断点属性下)
#2
17
The tick means that the breakpoint has been successfully set. I think it may only appear when you're doing remote debugging; when you add a breakpoint, it starts out as a plain ball, but once the JPDA agent in the remote system has been told about it, and has confirmed it's set, then it gets a tick.
tick表示断点已成功设置。我想它可能只在你进行远程调试时出现;当你添加一个断点时,它开始是一个普通的球,但是一旦远程系统中的JPDA代理被告知它,并且已经确认它被设置,那么它就会得到一个勾号。
#3
8
I have created an example code with explanation inline.
我已经创建了一个内联解释的示例代码。
public class Breakpoints {
int field1; // watchpoint - suspend when field1 is read
int field2; // watchpoint - suspend when field1 is written
int field3; // watchpoint - suspend when field1 is read or written
public void method() {
int x;
x = 10; // suspend before this line is executed
x = 11; // same as above but this breakpoint is temporarily disabled
for (int i = 0; i < 100; i++) {
x = i; // conditional breakpoint - suspend when i==5
}
}
}
Once you select Skip All Breakpoints
in the Breakpoints view (Window | Show Viev | Debug | Breakpoints
), all the icons become diagonally struck through like this:
在断点视图(窗口|显示Viev |调试|断点)中选择“跳过所有断点”后,所有图标都会对齐,如下所示:
#4
5
Adding to earlier answers. The small white c
over a green ball icon means that the breakpoint is at the class level.
添加到更早的答案。绿球图标上的小白色c表示断点处于班级。
Eclipse帮助
#5
4
I think answer given by @sleske is explaining all things except for :
我认为@sleske给出的答案是解释所有的事情,除了:
Blue Ball with Tick : Breakpoint is successfully set because Your Source code matches with the Byte Code and debug control will reach there.
带勾选的蓝球:断点已成功设置,因为您的源代码与字节代码匹配,并且调试控件将到达那里。
Only Blue Ball : Source code differs from Byte code (May be you are running a older Snapshot of code). Control will never reach at this breakpoint. You will have to update your JARs to get control to these breakpoints.
只有Blue Ball:源代码与字节代码不同(可能是您运行较旧的代码快照)。控制永远不会到达这个断点。您必须更新JAR才能控制这些断点。
#1
131
- blue ball: regular breakpoint, active (possibly with a hit count set)
- 蓝色球:常规断点,活动(可能设置命中数)
- empty ball (i.e. white): breakpoint has been disabled (remove checkmark in the breakpoint view, or
disable
in context menu) - 空球(即白色):断点已被禁用(在断点视图中删除复选标记,或在上下文菜单中禁用)
- diagonal line through breakpoint: all breakpoints have been disabled (button
skip all breakpoints
in breakpoint view) - 对角线到断点:所有断点都被禁用(按钮跳过断点视图中的所有断点)
- question mark next to breakpoint: a condition is active for this breakpoint (look under properties of the breakpoint)
- 断点旁边的问号:此断点的条件有效(查看断点属性下)
#2
17
The tick means that the breakpoint has been successfully set. I think it may only appear when you're doing remote debugging; when you add a breakpoint, it starts out as a plain ball, but once the JPDA agent in the remote system has been told about it, and has confirmed it's set, then it gets a tick.
tick表示断点已成功设置。我想它可能只在你进行远程调试时出现;当你添加一个断点时,它开始是一个普通的球,但是一旦远程系统中的JPDA代理被告知它,并且已经确认它被设置,那么它就会得到一个勾号。
#3
8
I have created an example code with explanation inline.
我已经创建了一个内联解释的示例代码。
public class Breakpoints {
int field1; // watchpoint - suspend when field1 is read
int field2; // watchpoint - suspend when field1 is written
int field3; // watchpoint - suspend when field1 is read or written
public void method() {
int x;
x = 10; // suspend before this line is executed
x = 11; // same as above but this breakpoint is temporarily disabled
for (int i = 0; i < 100; i++) {
x = i; // conditional breakpoint - suspend when i==5
}
}
}
Once you select Skip All Breakpoints
in the Breakpoints view (Window | Show Viev | Debug | Breakpoints
), all the icons become diagonally struck through like this:
在断点视图(窗口|显示Viev |调试|断点)中选择“跳过所有断点”后,所有图标都会对齐,如下所示:
#4
5
Adding to earlier answers. The small white c
over a green ball icon means that the breakpoint is at the class level.
添加到更早的答案。绿球图标上的小白色c表示断点处于班级。
Eclipse帮助
#5
4
I think answer given by @sleske is explaining all things except for :
我认为@sleske给出的答案是解释所有的事情,除了:
Blue Ball with Tick : Breakpoint is successfully set because Your Source code matches with the Byte Code and debug control will reach there.
带勾选的蓝球:断点已成功设置,因为您的源代码与字节代码匹配,并且调试控件将到达那里。
Only Blue Ball : Source code differs from Byte code (May be you are running a older Snapshot of code). Control will never reach at this breakpoint. You will have to update your JARs to get control to these breakpoints.
只有Blue Ball:源代码与字节代码不同(可能是您运行较旧的代码快照)。控制永远不会到达这个断点。您必须更新JAR才能控制这些断点。