Author Topic: can not show variable's value when debugging  (Read 5556 times)

hongxing

  • Guest
can not show variable's value when debugging
« on: October 20, 2005, 03:55:34 am »
my environment is SuSE Linux Enterprise 9, my app type is a simplist c console app as following:
int main()
{
  int i = 1234;
  i++; // <--- run to here
  return 0;
}

when debugging to line 4, I add i to watch window, but can not see its value.

why?

hongxing

  • Guest
Re: can not show variable's value when debugging
« Reply #1 on: October 20, 2005, 04:41:25 am »
btw:
I use cvs-head version C::B. bufore debugging, I checked the targets' option:
  generate debug info[-g]
and checked the gdb plugin's option:
  evaluate expression under cursor.

when debugging, I put cursor under variable i, but only "i = " displayed, none of its value

thanks!

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: can not show variable's value when debugging
« Reply #2 on: October 20, 2005, 08:54:06 am »
One thing to check is that you shouldn't have optimizations turned on.
Also, do you use the ansi or unicode wxWidgets version? I tried it with the ansi version and it works as expected.
Be patient!
This bug will be fixed soon...

hongxing

  • Guest
Re: can not show variable's value when debugging
« Reply #3 on: October 21, 2005, 01:54:41 am »
I have turned optimize options off.

I use the Unicode version of C::B.

hongxing

  • Guest
Re: can not show variable's value when debugging
« Reply #4 on: October 21, 2005, 03:38:22 am »
just soon, I recompiled C::B to ansi version.
and it works.

but my project need to use Chinese/Korean characters, I must use unicode version of C::B.
can anyone solve this bug in unicode version of C::B?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: can not show variable's value when debugging
« Reply #5 on: October 21, 2005, 05:50:02 am »
Hmmm I'm afraid this bug is new. Please report it at the sourceforge project page so we don't forget about it. In the meantime, here's a question: Is the variable shown via "watches"?
« Last Edit: October 21, 2005, 05:59:11 am by rickg22 »

hongxing

  • Guest
Re: can not show variable's value when debugging
« Reply #6 on: October 21, 2005, 06:01:08 am »
no, it is not showed in anyway.