Author Topic: how to see the value of local variable when debugging?  (Read 4640 times)

hongxing

  • Guest
how to see the value of local variable when debugging?
« on: October 18, 2005, 02:03:14 am »
I add my local variable to watch window, when debugging, how to see its valuse?
my code is:
int main()
{
    int i;
    ...
    i++;  // <----debug to here, how to see value of i ?
    ...
}

thanks!


Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: how to see the value of local variable when debugging?
« Reply #1 on: October 18, 2005, 03:41:03 am »
Debug -> Edit watches... -> Add

In the dialog put the name of the variable you want to "watch" and click OK.

Now, in the Management dock click on the Watches tab and it'll be there with its value.

hongxing

  • Guest
Re: how to see the value of local variable when debugging?
« Reply #2 on: October 18, 2005, 11:38:13 am »
I added, but when debugging, can not see its value in the wach window.
my environment is suse linux enterprise 9, app type is console app.

thanks!

sethjackson

  • Guest
Re: how to see the value of local variable when debugging?
« Reply #3 on: October 18, 2005, 05:03:02 pm »
I added, but when debugging, can not see its value in the wach window.
my environment is suse linux enterprise 9, app type is console app.

thanks!

Well you could position the cursor right by the variable. Then right click and select (while you are running the debugger) Watch 'variable_name'.