Archived

This topic is now archived and is closed to further replies.

graveyard filla

problems with debugging .........

Recommended Posts

high, while stepping through my code ive noticed some annoying things.. im using vis studio .net 2k3... anyway, i noticed that a lot of the times it will give me a junk value for a variable... for example, it will say something like -1034093430... OR, something like "expression could not be evaluated.."... anyway, i see it like this for a lot of my variables (i get garbage values for half my damn variables)... so, i will make a ofstream and file_out << these variables... the resulting text file shows the correct value.. ie, my debugger will say -13234249, but the text file says the variable was 8 (or something) (which is what its SUPPOSED to be)... also, i noticed that i can never see the values of variables in my containers... i think this is an issue with the compiler? i found a program on sourceforge called VSEdebug or something, which is supposed to let you see inside containers while debugging, but i couldnt get it to work apparently cuz i still cant see the values... so why is the debugger sucking like this? is it normal in that the debugger wont tell me the real value inside a variable half the time? is this an issue with the compiler, or just something i have to deal with? any help / advise is appreciated!!

Share this post


Link to post
Share on other sites
quote:
Original post by graveyard filla
... i noticed that a lot of the times it will give me a junk value for a variable...
The variable has not been initialized yet.
quote:
Original post by graveyard filla
... something like "expression could not be evaluated.."...
The variable is probably not in the same scope as the current line, so it doesn''t exist at that point, or it might be referenced by a pointer with a garbage value.

OR you are debugging the Release configuration which has been optimized so the machine code doesn''t match the C code very well.


John Bolton
Page 44 Studios
Current project: NHL Faceoff 2005 PS2

Share this post


Link to post
Share on other sites