Debugger not update values in array

General questions regarding the usage of CodeLite
worawitp
CodeLite Curious
Posts: 1
Joined: Wed Nov 04, 2015 5:21 pm
Genuine User: Yes
IDE Question: c++
Contact:

Debugger not update values in array

Post by worawitp »

When I try to debug my source code in C, the code change value in array and the "Locals" tab of debug does not update the values in array. Below is the source code:

Code: Select all

#include <stdio.h>

int main(int argc, char **argv) {
  int array[10];
  int *pointer;
  int test;
  test = 0;
  test = 1;
  test = 2;
  array[0] = 50;
  array[1] = 100;
  pointer = &array[0];
  return 0;
}
When the debugger executes line "test = 1;", the variable test in Locals tab change from 0 to 1 and showing in red indicate that the value of test variable is changed which is normal as expected. However, when the debugger executes line "array[0] = 50;", there is nothing change. The value in array is not update. I need to press the "refresh" button to see the updated value. After pressing the "refresh" button, it seems that the values of all variables are not update after executing later statements. In the above code, if I do not press "refresh" button, the pointer value in Locals tab is changed and showing in red after executing line "pointer = &array[0];" which is normal. However, if I press "refresh" button to refresh values in my array, the value in pointer is not update when executing the line "pointer = &array[0];" which works before.

I am using CodeLite 9.0.0 64bit in Windows 8.1.