The application example for this scenario accepts a date passed from the command line and converts it to a Julian calendar date. The application used in this scenario was built in Creating a Console. If youÆd like to create this project to complete the following exercises, do so now.
You have entered a date for conversion, stopped on a breakpoint youÆve set, and used the debug windows to examine some of your programÆs variables. You have an idea of what the problem may be, but youÆd like to step through the statements of your code to get a better understanding of whatÆs really happening. The following procedure shows you how to trace through your programÆs execution.
To step through your program when in break mode
Tip Choose a line that will be executed before the application ends.
for(int nCount=1; nCount < m_nMonth; nCount++)
A red dot appears in the margin indicating the line on which the breakpoint was set.
The yellow arrow in the margin points to the next instruction to be processed.
In the open debug windows, values for member variables display in red whenever these values change. If youÆre following the debugging scenario for a Console application, continue stepping through your applicationÆs source code until the values for m_nDayOfYear
and nCount
change to red in the open debug windows.
For more information about stepping through your programÆs code with the debugger, see Stepping Through Code to Trace Execution,
To terminate the debugging session:
For more ways to stop a debugging session, see Ending a Debugging Session.
When youÆre program enters break mode, you may want to set another breakpoint or examine one or more Debug Windows to view the values of your programÆs member variables.
See Basic Debugging Procedures for additional information on using the features of the integrated debugger.