Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wandering breakpoints in Eclipse

 
Jonathan Sachs
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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. eclipse.org says that the current stable release is v4.3.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic