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.

0
3 comments

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.

0
Avatar
Permanently deleted user

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.

0

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). 

0

Please sign in to leave a comment.