Different debugging results when using CLion debugger GUI and system-wide gdb
```c
/*
* main.c
*/
#include <stdio.h>
extern void fun_3_7();
int main(int argc, char *argv[]) {
fun_3_7();
return 0;
}
/*
* fun_3_7.c
*/
#include <stdio.h>
void fun_3_7() {
double result = 0;
char expression[255] = {0};
printf("Input the expressions: ");
//Debug here
int i = 0;
printf("i : %d\n", i);
int length = i;
printf("\n");
}
```
----
Using CLion debugger GUI:

Using system-wide gdb:

Also, I set CLion debugger to use system-wide GDB. Still, it doesn't work. As you can see below:

Is it a bug or something? what can I do? I really like CLion debugger GUI. But it gave me wrong results.
Please sign in to leave a comment.
Hello! Please create a default "C Executable" project in CLion, add 'int i = 0;" line in it and specify what behavior you observe when debug.
If I do this, it gives me a normal result of course. It just happens randomly. So, I can't tell you why and when it happens. I hope I could record it for you when I encountered it.
If you manage to collect the debugger log (here is the instruction) when the issue happens, it would be very helpful. You can send it to clion-support at jetbrains.com. Do not forget to disable debug logging after that. Note that logs might contain private user's information (like file paths and names).