What is the difference between a “switching line breakpoint” and a “switching breakpoint” in Eclipse?

I just can't figure out the two options in the Run menu in the Eclipse menu. Isn't a breakpoint usually a line item? I understand that there may be such a case:

if (x >= 0 && x < 4 && y >= 0 && y < 4) source ^= 1 << (x * 4 + y); 

However, when switching the breakpoint of the second line to set a breakpoint, it can also be disabled by switching the breakpoint . So what is their difference on earth and how to distinguish them with symbols?

+7
source share
2 answers

The switching point of the switching point only affects the line breakpoint. the other acts on any breakpoint. Here ( http://eclipse-tips.com/tips/29-types-of-breakpoints-in-eclipse ) you can see a list of possible breakpoints in eclipse.

+2
source

In eclipse, you can have 5 types of break points:

  • the one you're used to: a regular breakpoint
  • a conditional breakpoint at which you stop on a line, but only when a certain condition is met
  • method breakpoint that starts when the method is entered
  • An exception checkpoint that stops on any line that throws a specific exception.
  • (according to the comments I forgot about these) watchdogs: using them, you will break whenever a specific field is available or changed. They can be customized from the diagram view.

The second option is also placed on a specific line, but as long as it needs to be configured, it can be considered something more special. The characters of the first two breakpoints are different. The third has a special character. The fourth has no symbol (it does not belong to any particular place).

This is because it beats your words Doesn't the usually breakpoint refer to a line .

You can also see the difference between them if you have this code:

 void func() { int a = 16; } 

Try running toggle breakpoint and toggle line breakpoint on the void func() . Do you see the difference? Switching a breakpoint actually selects the appropriate option between the toggle line breakpoint and the toggle method breakpoint .

+6
source

All Articles