File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Wandering breakpoints in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Wandering breakpoints in Eclipse" Watch "Wandering breakpoints in Eclipse" New topic

Wandering breakpoints in Eclipse

Jonathan Sachs

Joined: May 21, 2013
Posts: 16
I'm just learning to use Eclipse (v4.2.2), although I have several years of experience in Java. I've noticed an odd problem with breakpoints: once I set them, they don't always stay put.

While I worked on my first Eclipse project I noticed that breakpoints often wandered from the place where I set them into a near-by comment and empty line, where Eclipse would not let me set a breakpoint directly. Sometimes I was able to remove the wandering breakpoints by double-clicking them, or by right-clicking them and selecting "Toggle breakpoint." Sometimes these actions had no effect. Sometimes I was unable to clear a breakpoint, then I returned to it after doing some other work and found I could clear it.

I assume that under some (unidentified) conditions, Eclipse is letting a breakpoint stay at the same line number when editing makes the line it was set on move up or down. I don't understand why this is happening or how to stop it. (It's not because I've been editing the source files outside Eclipse; I haven't.)

Can anyone enlighten me on this?
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3733

Jonathan Sachs wrote:(It's not because I've been editing the source files outside Eclipse; I haven't.)

Do you use some version control system? Do you operate it outside of the IDE? This is what I do and this obviously can bring breakpoints away from their intended lines.

My IDE has a special view for all breakpoints, I can always delete them there (once in a while I do a big purge ). Not being able to delete a breakpoint in code editor sounds like a bug, but that breakpoins view might allow you work-around the issue.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

I recognize what you're talking about, I have noticed in the past that my Eclipse breakpoints occasionally wander in the way you describe. Although like Martin, for me it hasn't really been a problem.

And I don't recall noticing it recently. Perhaps it's been fixed in Eclipse Juno?
Jonathan Sachs

Joined: May 21, 2013
Posts: 16
Eclipse does have a debug window, and I found that it does let me remove the wandering breakpoints consistently.

I'm not using version control on this project. (If I did I'd expect Eclipse to allow for it, since it's coupled with the version control system.)

But I don't think the problem has gone away. I'm using Eclipse v4.2.2, and as I understand it, version 4.x is Juno. says that the current stable release is v4.3.
I agree. Here's the link:
subject: Wandering breakpoints in Eclipse
It's not a secret anymore!