I've found Dev-Cpp Debug's feature kind of poor. I've had this problem, specifically the way you describe, and I believe that the debugger gets lost between frame switches. You can always delete the watch variable and re-enter it. My solution is to only use the Dev-Cpp debugger for simple debugging that doesn't require variable watching, and to use either the command line GDB or the Insight GUI debugger for complex debugging that requires variable modification and things like conditional breakpoints.
The Insight debugger package is a significantly better tool for debugging, though it has it's own idiosyncratic bugs. Insight does crash regularly, and bogus errors (mostly segmentation faults) crop up. However, it's Locals window is very handy, as it shows all class variables including all of the 'this' structure in one easy to access place. Other useful features are a variable memory dump, useful for examining memory referenced by pointers (such as structures, etc.), and a handy GUI. The command window allows for full GDB functionality, as in the command line version of GDB.
To answer your second question, to modify the value of something, it must be in the Debug window, then right click on the variable to get Modify Value to come up. You can then change it. However, I just tried that, and initially there is no change, then I lost all watched variables. When I again set a watch on the variable that I just changed, it had the new value. I'm running 4.9.9.1, with the latest updates that actually work. Much easier in the Insight debugger.
BTW: the above didn't work for a global structure that has individual elements.
Fernando Masanori Ashikaga <fm...@te...> wrote:
Sometimes in depuration of a program in Debug window
variables are not refreshed. For example, in a function a
int variable i have a value 2, when I returned for other
function a variable continues with value 2 beside the
scope is other (with other value for the variable)
Anyone have experience with this problem?
Tranks in advance,
Fernando Masanori
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.7 - Release Date: 10/2/2005
Alfred P. Reaud
|