Code::Blocks Forums

User forums => Help => Topic started by: Dwyerfire on August 28, 2013, 09:00:54 pm

Title: cant watch varaibles "not in this context"
Post by: Dwyerfire on August 28, 2013, 09:00:54 pm
this may be something really stupid or possibly even a bug i hav no idea but on code::blocks 12.11 using the code::blocks debugger i cant watch variables because it always says "its not in the current context" even tho it cleary is

OS: ubuntu 12.04
additionaly info: its ubuntu svn build 9156
Title: Re: cant watch varaibles "not in this context"
Post by: oBFusCATed on August 28, 2013, 10:50:30 pm
Are you sure you're not debugging optimized applications?
Title: Re: cant watch varaibles "not in this context"
Post by: Dwyerfire on August 28, 2013, 11:05:56 pm
im almost positive ill double check

EDIT: i just double checked and im not, i even checked compiler flags in case i messed that up accidentally (versus just looking at build target)
Title: Re: cant watch varaibles "not in this context"
Post by: oBFusCATed on August 28, 2013, 11:20:24 pm
Does it work in a simple console project?
Title: Re: cant watch varaibles "not in this context"
Post by: Dwyerfire on August 28, 2013, 11:23:02 pm
let me check
EDIT: still trying to make sense of this but it doesnt even stop at the break point i set on the simple console program
EDIT: oh heres something that might be useful whenever i run it in debug it gives me a warning message from the console:
"warning: GDB: Failed to set controlling terminal: Operation not permitted"
lol sry for just realizing it its just that ive had that message forever and never thought much of it but now i that i think about it i may hav had this problem forever

p.s. i when i say "run in debug" i mean actually using the debugger with debug build target not just build target
p.p.s i just remembered im using 4.8.1 GCC not the standard 4.6 or w/e
Title: Re: cant watch varaibles "not in this context"
Post by: oBFusCATed on August 29, 2013, 12:45:31 am
Have you read this: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
Title: Re: cant watch varaibles "not in this context"
Post by: Dwyerfire on August 29, 2013, 12:48:12 am
dont worry ik how to use the debugger on a basic level when i said ive always had it this problem i meant on this installation of C::B
i did still skim it tho to be safe
EDIT: i MAY actually hav had it "optimized" (not hav had the debugging symbols being "produced") but because on my project options it said not to produce them but on debug build target it said TO produce them with append build target options to project options setting chosen i switched it to only use build target options and now it can recognize one variable as a struct but doesnt tell me anything else (it may hav been that way before i didnt test it) and it was the way it was b4 with all other variables (primitive types)
EDIT: one second thought disregard last edit its just useless jargen that almost definitely irrelevant
EDIT: PLZ HELP im even willing to try using the code::blocks in my default repo (10.05) if u think that might help
Title: Re: cant watch varaibles "not in this context"
Post by: Dwyerfire on August 30, 2013, 12:32:45 am
nvm i finally found the issue remember how isaid i use GCC 4.8.1 well apparently the debug apps written by that cannot be recognized by my older debugger (7.4) so i had to upgrade to 7.6