[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

I do not see debugger entering a function

Posted on 2014-08-16
5
Medium Priority
?
130 Views
Last Modified: 2014-08-16
//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
0
Comment
Question by:rgb192
  • 3
  • 2
5 Comments
 
LVL 32

Accepted Solution

by:
phoffric earned 2000 total points
ID: 40265549
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
 

Author Closing Comment

by:rgb192
ID: 40265551
Turns debugging into playing a video game, but your solution works.

Thanks.
0
 
LVL 32

Expert Comment

by:phoffric
ID: 40265552
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
 

Author Comment

by:rgb192
ID: 40265557
Thanks for other solution also with breakpoint.

I up-voted your articles
0
 
LVL 32

Expert Comment

by:phoffric
ID: 40265565
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question