Tell a friend
Link to us
Bookmark Us
Total Members
      Members: 87081
Sitemap Forum Chat
 
C++ Home
C++ Members (4396)
C++ Member Articles ( 19 )
C++ Discussion (116)
C++ Q & A ( 4 )
- C++ Ask Question
- C++ Questions
- C++ Unanswered Questions
C++ Resources
C++ Source Code (98)
C++ Articles (82)
C++ Blogs (0)
C++ Jobs (0)
C++ Components (11)
C++ Books (2)
C++ Websites (45)
C++ News (49)

 
Resource Directory
ODBC (0)
Source Code (0)

 
GROUP INFO
Members: 4396
Access Type: Anyone can join

 

 
LEARNING CENTER
TUTORIALS
.NET
.NET Tutorial
ASP Tutorial
ASP.NET Database Tutorial
ASP.NET Development Tips
ASP.Net Security,Internationalisation And Deployment
ASP.NET Server Controls Tips
ASP.NET Tutorial
C Sharp Tutorial
LINQ Tutorial
Web Development
Flex Tutorial
HTML Tutorial
Javascript Tutorial
Learn AJAX Tutorial
PHP Tutorial
Software Development
Database Tutorial
SQL Tutorial
UML Tutorial
Java
Ant Tutorial
EJB 3 Tutorial
Grails Tutorial
Hibernate Tutorial
Java 1.6 Tutorial
Java Tutorial
Java Web Component Tutorial
Java XML Tutorial
JDBC Tutorial
JDK1.5 Tutorial
JSF Tutorial
JSP And J2EE Design Tutorial
JSP Tutorial
Service-Oriented Architecture (SOA) Tutorial For Managers
Spring Tutorial
Struts Tutorial
Tomcat Tutorial

RESOURCES
Q & A (531 )
Source Code (3276 )
Articles (365 )
Books (373 )
Components (1647 )
News (898 )
Websites (1208 )

SUBMISSIONS
Submit Article
Submit Website
Submit News
Submit Source Code
Submit Component

COMMUNITY
Authors
Members Directory
Discussion Forum
Chat

SITE
About Us
Sitemap
Search
Contact Us
Feedback
Tell a Friend
Advertise

 

Home > C++ > Member Articles > Algorithms >
 

Debugging (Part 1)


  Author : smurfle
  Date Published : 07/8/2003
  Rating No Rating
  Accessed : 6596
   smurfle
Debugging is a vital part of programming. Whenever a program doesn't do what you expect, even if it doesn't blow up, you should turn to the debugger to see what's really going on.
Debugging Vocabulary
Probably the most important word in debugging is breakpoint. A breakpoint is a spot in your program, a single line of code, where you would like to pause. Perhaps you are wondering how many times a loop is executed, whether control transfers inside a certain if statement, or whether a function is even called. Setting a breakpoint on a line will make execution stop when that line is about to be executed. At that point you may want the program to be off and running again or want to move through your code a line or so at a time. You may want to know some of your variables' values or see how control transferred to this point by examining the call stack. Often, you'll spot the cause of a bug and correct your code on the spot.
When it's time to move along, there are a number of ways you might like execution to resume. These are explained in the following list:
• Go--Execute to the next breakpoint or, if there are no more breakpoints, until the program completes.
• Restart--Start again from the beginning.
• Step Over--Execute only the next statement, and then pause again. If it is a function call, run the whole function and pause after returning from it.
• Step Into--Execute just the next statement, but if it is a function, go into it and pause before executing the first statement in the function.
• Step Out--Execute the rest of the current function and pause in the function that called this one.
• Run to Cursor--Start running and stop a few (or many) lines from here, where the cursor is positioned.
Most information made available to you by the debugger is in the form of new windows. These are discussed in the following sections.



 
   Add Comment  Printer Friendly
   View All Comments  Email to a friend
   Add to my Favourites  Report Bad Submissions  Submit Feedback
   Rating Download PDF version
 
                 Click each image to add
this page to each site.
 
Related Articles of C++
Previous Article    -     Random Articles    -     Next Article
 
 
 
Comments Available

    No comment available at the moment.Be the first one to make a comment

 
 
 
 
 
Welcome Guest Signup
Member's Panel
EMAIL
PASSWORD
Forgot your password?
New User? Click Here!
 
Resend Activation Email!

SEARCH
 



 
 
 
 
 


Home | Login | About Us | Contact Us | Privacy Policy | Advertising | Feedback Please

Warning: Unknown(): write failed: Disk quota exceeded (122) in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0