Stepping through code

General questions regarding the usage of CodeLite
Tigers!
CodeLite Enthusiast
Posts: 13
Joined: Mon Feb 23, 2009 10:05 am
Location: Australia
Contact:

Stepping through code

Post 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?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Stepping through code

Post 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
Make sure you have read the HOW TO POST thread
Post Reply