eclipse can't remove certain breakpoints

11,800

Solution 1

Right click on the break point -> Disable break point. Should work. Also, if you click (in the same menu) on the "toggle breakpoint" again, it disappears fully; In the first case it just disables it, but it remains existing.

Solution 2

open debug perspective [right conrer]

go to breakpoints

click clear all breakpoints [double X] or scroll until you find the breakpoint which doesn't want to go away and delete it.

Solution 3

None of the solutions here worked for me. Because I removed the breakpoints from breakpoints view but could not get rid of them in the editor. I think this is a kind of bug. What it worked for me is simply

  1. Select the whole class (Ctrl + a)

  2. Cut the whole class (Ctrl + x)

  3. Paste it back (Ctrl + v)

Sometimes, the solution is easier than we think:)

Solution 4

Goto Run -> Remove All Breakpoints. This will clear all breakpoints which cannot be removed individually.

Solution 5

This happens to me sometimes. In the Debug Perspective there is a breakpoints tab. Even if breakpoints have become invisible in the editor, they are probable visible in that list. So you can safely remove the breakpoints that you want to get rid off.

Share:
11,800
benathon
Author by

benathon

I'm a programmer, circuit guy, DSP engineer, and founder.

Updated on June 05, 2022

Comments

  • benathon
    benathon about 2 years

    Double-clicking in the blue bar on the left of eclipse sets a breakpoint. Double-clicking again removes the breakpoint. This works great for me but if I use git to checkout a different branch, often times the blue dots for breakpoints get "confused" or something. I can no longer double-click to unset them. I am forced to go into debug perspective, and find the breakpoint in the "breakpoints" view and then right click and remove. Does anybody have an easier solution for this? I am coding in java on windows 7 for what it's worth.

    I can reproduce this bug with this code (assume the if is line 1):

    if(bool)
    {
      // comment
      doSomething();
    } else {
      doOther();
    }
    

    I breakpoint on line 4 - doSomething(). Then I put a new line above the if to shift everything down. (moving the breakpoint on line 5). Then I do git stash save. When I click back to eclipse, the blue dot is displayed on the correct line, but the breakpoint window still says line 5. If I double click to disable, it actually adds a second breakpoint on line 4.

    I feel like I should report this to the Eclipse guys.

  • Bob Flannigon
    Bob Flannigon over 11 years
    I think he wants to avoid having to do this! Personally I develop in the Debug perspective (once rearranging it), I never fully saw the point of having both Java and Debug perspectives.
  • benathon
    benathon over 11 years
    Interesting. I think i need to get another monitor before would have enough space for debug only. Personally I switch into debug because I like to always show the backtrace and expressions windows. When my code isn't running then I switch into java which always shows the project explorer on the left. Whatever works I guess
  • benathon
    benathon over 11 years
    I just edited my question to address what I discovered RE your comment here.
  • user
    user over 11 years
    The same issue happens, when the running code is different from the source code you provide. Like if you run a web app with the old compiled code, but referring to the new sources. Could be something like that.
  • SlimPDX
    SlimPDX almost 10 years
    I was unable to toggle the breakpoint before or after I disabled them. TheWhiteRabbit's answer worked for me
  • DrB
    DrB over 8 years
    Perfect! This worked for me. I had this issue for really long time.
  • Kandy
    Kandy over 6 years
    It works, some time disabling the break points doesn't work in Oxygen.
  • Pere
    Pere about 4 years
    That's not an "easy" solution" or easy to infer, either