Author Topic: New Debugging Problem  (Read 3987 times)

Offline bangorme

  • Multiple posting newcomer
  • *
  • Posts: 28
New Debugging Problem
« on: June 13, 2015, 03:52:34 am »
Linux: Fedora 22
Code::Blocks: svn 10323

Since the last update of C::B, I've started to get a strange problem.  It can be recreated as such:

Create a new project
Compile and run the project
Set breakpoint
debug and step, line for line, through program
Close project
Create another new project
Compile and run the second project
Set breakpoint
debug and step through program line by line

The first project's local variables, and every variable you entered into the watch window in the first project, will still be there for the second project.  Local variables for the current project (second project) may or may not be there.

The only way to clear the watch window is to shut down C::B and restart it.  Then reopen the second project.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: New Debugging Problem
« Reply #1 on: June 13, 2015, 04:50:22 am »
The screen shot looks correct.
Can you post the full debugger's log?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline bangorme

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: New Debugging Problem
« Reply #2 on: June 13, 2015, 04:58:45 am »
The screen shot looks correct.
Can you post the full debugger's log?

I'll get you the debugger log.  But, in the screen shot, everything in below  "i" in the watch window (starting with *ptr) is from the closed previous project.

Edit:
Going back over old projects doesn't replicate the error.  I'm going to have to start two new projects.
« Last Edit: June 13, 2015, 05:19:46 am by bangorme »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: New Debugging Problem
« Reply #3 on: June 13, 2015, 11:22:58 am »
The variables added manually by you have to be manually deleted, too.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline bangorme

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: New Debugging Problem
« Reply #4 on: June 14, 2015, 01:32:44 am »
The variables added manually by you have to be manually deleted, too.

OK......  I don't see that documented in the C::B manual, but at least that explains it.  For others encountering this behavior, you can clear all manually entered variables by right clicking one in the watch window, and chosing "delete all." 

Anyway, even though I've been out of C++ and programming IDE's for over 10 years, this behavior doesn't seem intuitive.  Perhaps for the "to do" list should be clearing the watch window when closing a project (or at least isolating it project to project).  I can't think of an instance where you'd want your last project's watch window in another project's debugging session.   If such a scenario exists, it could be an option.

Thanks for helping me understand the issue!