• C

I do not see debugger entering a function

//Character arrays and pointers
#include<stdio.h>
#include<string.h>
void printOnScreen(char* C)
{
	int i = 0;
	while (*(C+i)!='\0')
	{
		printf("%c", C[i]);
		i++;
	}
	printf("\n");
}
int main()
{
	char C[20] = "Hello";
	printOnScreen(C);
}

Open in new window



the debugger should go to function
printOnScreen

instead next line is crtexe.c
and never back to 1.c


I want to see debugger in printOnScreen function
LVL 1
rgb192Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

phoffricCommented:
You are at Line 17 and you want to go into the function, printOnScreen, right?
Then hit F11 to step into the function.
See sections 2.3 and 2.4 in this article:
http://www.experts-exchange.com/Programming/Languages/CPP/A_2688-Microsoft-Visual-Studio-2008-Express-C-Quick-and-Dirty-Debugger-Tutorial.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rgb192Author Commented:
Turns debugging into playing a video game, but your solution works.

Thanks.
0
phoffricCommented:
Or you can set a breakpoint in the printOnScreen function, start over, and hit F5 to begin running the program until either the end, or until it hits the breakpoint.
0
rgb192Author Commented:
Thanks for other solution also with breakpoint.

I up-voted your articles
0
phoffricCommented:
Good that this is now working for you. Learning how to use this debugger will save you a ton of time as you learn C.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.