Page 1 of 1

Stepping through code

Posted: Fri Jul 03, 2009 9:07 am
by Tigers!
I seem to remember in Borland C IDE (admittedly in it almost 15 years ago now) that you used to be able to step through your code to see where it was going. Is it possible to do the same in Codelite?
If not how can we tell where it is going (or not as the case may be)?

Code: Select all

tmpFile = fopen(rptline, "r");
			while (fgets(fileline, 255, tmpFile)!=NULL) {
				printf("*** Inside the RPT file contents ***\n");
			}
			printf(" Closing %s", rptline);
			fclose(tmpFile);
The little snippet of code is where I want my program to go. But running it does not display the line "*** Inside the RPT file contents ***" and I do not know why it is not getting there. I have tried mucking around with watches, breakpoints etc without any success. Is there some doco that explains consisely how to use Codelite in this manner?

Re: Stepping through code

Posted: Fri Jul 03, 2009 10:09 am
by eranif
maybe this line returns NULL?
Tigers! wrote:fgets(fileline, 255, tmpFile)
If codelite does not break at that line, then the problem is in your code, and probably the above line returns NULL.

Eran