0

I am trying to debug a project I'm working on but whenever I try to step through the code I notice that eclipse is running code which is no longer there. It was doing this with commented code which was odd enough but to run code which is completely deleted is just bizarre. I have cleaned the project and rebuilt several times. Any idea what may cause this?

I am running on ubuntu 10.10 with eclipse indigo and using cdt

Bill.Caffery
  • 465
  • 1
  • 5
  • 21
  • You could do what I always do: reformat the machine, reinstall the os, jdk, and ide, then print out the backed up code and type it in by hand to make sure none of the bad bits get back on the machine. (Rebooting is often faster and typically works as well.) –  Jan 25 '12 at 03:53
  • Do you have any optimization enabled? That can mess up debugging. – Some programmer dude Jan 25 '12 at 06:30
  • Joachim I'm going to say no only because I wouldn't know how to do that. Is there any way to check? – Bill.Caffery Jan 25 '12 at 10:18

1 Answers1

0

I've seen this happen before, but its always something I forgot or missed :)

Regardless of what you think is happening, you still have that code in your path somehow.

You may even have a circular dependency that was not caught by Eclipse, or some other project reference you are not expecting.

Brill Pappin
  • 4,692
  • 1
  • 36
  • 36
  • does c++ have a classpath? i wouldn't think so... tho i could be wrong. i deleted all .o and .d files from the /default directory and it just seemed to reappear i also deleted the project and created a new one and idk everything just keeps doing the same thing... – Bill.Caffery Jan 25 '12 at 04:37
  • Ahh... oops i completely missed that "cdt" right at the end... however the statement stands. Whatever the OP is running into, it's a path problem. The code it still accessible and executable. that also happens to be the only logical explanation as to how its getting executed. – Brill Pappin Jan 25 '12 at 14:32