Author Topic: cant watch varaibles "not in this context"  (Read 8863 times)

Offline Dwyerfire

  • Single posting newcomer
  • *
  • Posts: 9
cant watch varaibles "not in this context"
« 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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: cant watch varaibles "not in this context"
« Reply #1 on: August 28, 2013, 10:50:30 pm »
Are you sure you're not debugging optimized applications?
(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 Dwyerfire

  • Single posting newcomer
  • *
  • Posts: 9
Re: cant watch varaibles "not in this context"
« Reply #2 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)
« Last Edit: August 28, 2013, 11:12:10 pm by Dwyerfire »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: cant watch varaibles "not in this context"
« Reply #3 on: August 28, 2013, 11:20:24 pm »
Does it work in a simple console project?
(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 Dwyerfire

  • Single posting newcomer
  • *
  • Posts: 9
Re: cant watch varaibles "not in this context"
« Reply #4 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
« Last Edit: August 29, 2013, 12:46:41 am by Dwyerfire »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(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 Dwyerfire

  • Single posting newcomer
  • *
  • Posts: 9
Re: cant watch varaibles "not in this context"
« Reply #6 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
« Last Edit: August 29, 2013, 10:28:22 pm by Dwyerfire »

Offline Dwyerfire

  • Single posting newcomer
  • *
  • Posts: 9
Re: cant watch varaibles "not in this context"
« Reply #7 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