eclipse can't remove certain breakpoints
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
Select the whole class (Ctrl + a)
Cut the whole class (Ctrl + x)
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.
benathon
I'm a programmer, circuit guy, DSP engineer, and founder.
Updated on June 05, 2022Comments
-
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 dogit 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 over 11 yearsI 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 over 11 yearsInteresting. 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 over 11 yearsI just edited my question to address what I discovered RE your comment here.
-
user over 11 yearsThe 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 almost 10 yearsI was unable to toggle the breakpoint before or after I disabled them. TheWhiteRabbit's answer worked for me
-
DrB over 8 yearsPerfect! This worked for me. I had this issue for really long time.
-
Kandy over 6 yearsIt works, some time disabling the break points doesn't work in Oxygen.
-
Pere about 4 yearsThat's not an "easy" solution" or easy to infer, either