???? ?? MS Visual C Tutorial

1 / 9
About This Presentation
Title:

???? ?? MS Visual C Tutorial

Description:

Set breakpoints. Start debugger. Debugger Windows. Execute the program Step By Step. A Real Example ... Setting Breakpoints When Values Change or Become True ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 10
Provided by: altair8

less

Transcript and Presenter's Notes

Title: ???? ?? MS Visual C Tutorial


1
???? ??MS Visual C Tutorial
  • 2005. 5. 8
  • MASSLAB ???

2
Overview
  • Debugging Example (using debugger)
  • Set breakpoints
  • Start debugger
  • Debugger Windows
  • Execute the program Step By Step
  • A Real Example

Visual Studio C 6.0 is used in the slide.
Currently Visual Studio .Net is available.
3
Debugging Example
  • Debugging
  • The process of finding and removing errors (bugs)
    from a software program
  • The most time-consuming and hardest job, when
    developing a large software
  • Debugger
  • A software tool that is used to detect the source
    of errors, by performing step-by-step execution
    of application code and viewing the content of
    code variables.
  • Using printf is not a good way to debug your
    program

4
Debugging Example1. Set Breakpoints
press F9 to set a breakpoint on the line When
the execution reaches any of them, it will be
stopped
5
Debugging Example1. Set Breakpoints (Advanced)
  • Advanced Breakpoints
  • Setting Breakpoints When Values Change or Become
    True
  • Setting Breakpoints at a Memory Location
  • How to use these features
  • Edit Breakpoints (AltF9)

For more information, visit http//msdn.microsof
t.com/library/default.asp?url/library/en-us/vccor
e98/HTML/_core_using_breakpoints.3a_.additional_in
formation.asp
6
Debugging Example2. Start Debugger
  • Go (F5)
  • Executes code from the current statement until a
    breakpoint or the end of the program is reached
  • Step Into (F11)
  • Single-steps through instructions in the program
  • Run to Cursor (CtrlF10)
  • Executes the program to the cursor

7
Debugging Example3. Debugger Windows (Default)
Current execution point
User specified values and expressions
Information about variables
8
Debugging Example3. Debugger Windows (Advanced)
  • Watch, Variables
  • Included in the default window
  • Call Stack
  • Stack of all functions that have not returned
  • Memory
  • Current memory contents
  • Registers
  • Contents of the general purpose and
  • CPU status registers
  • Disassembly
  • Assembly-language code

9
Debugging Example4. Execute the Program Step By
Step
  • Go (F5)
  • Restart (CtrlShiftF5)
  • Stop Debugging (ShitF5)
  • Step Into (F11)
  • Single-step through instructions in the program.
    Enters each function call that is encountered
  • Step Over (F10)
  • Single-steps through instructions in the program.
    Execute a function call without stepping through
    the function instructions
  • Step Out (ShiftF11)
  • Run to Cursor (CtrlF10)
Write a Comment
User Comments (0)