Hints on debugging

Slides:



Advertisements
Similar presentations
To Err Is Human Presented by. Before We Get Started Please turn your cell phones to stun. Restrooms are down the hall and on the right We’ll take a 5.
Advertisements

COMPUTER PROGRAMMING I Essential Standard 5.02 Understand Breakpoint, Watch Window, and Try And Catch to Find Errors.
Why care about debugging? How many of you have written a program that worked perfectly the first time? No one (including me!) writes a program that works.
Microsoft® Small Basic Debugging Aids Estimated time to complete this lesson: 1 hour.
This game is loosely based on the Whack-A- Mole arcade game.  Each game starts with 45 seconds of play.  Moles randomly pop out of holes on the landscape.
How to Debug VB .NET Code.
Guidelines for working with Microsoft Visual Studio.Net.
Guidelines for working with Microsoft Visual Studio 6.
An Object-Oriented Approach to Programming Logic and Design Chapter 6 Looping.
Debugging Logic Errors CPS120 Introduction to Computer Science Lecture 6.
Meet Me on Mars Lesson 7 Variables and Messages. Events and Variables 1. Click the _________ button 2. When ________ clicked, set ______ to ____ 3. Now,
Using a Debugger. SWC What is ”debugging”? An error in a computer program is often called a ”bug”… …so, to ”debug” is to find and get rid of errors in.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
Lecture Etiquette Chemistry. The Teacher Will: Try to present material in a logical fashion Allow time for questions and comments at the appropriate time.
DEBUGGING CHAPTER Topics  Getting Started with Debugging  Types of Bugs –Compile-Time Bugs –Bugs Attaching Scripts –Runtime Errors  Stepping.
Debugging Projects Using C++.NET Click with the mouse button to control the flow of the presentation.
08/10/ Iteration Loops For … To … Next. 208/10/2015 Learning Objectives Define a program loop. State when a loop will end. State when the For.
Debugging in Java. Common Bugs Compilation or syntactical errors are the first that you will encounter and the easiest to debug They are usually the result.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
Python Repetition. We use repetition to prevent typing the same code out many times and to make our code more efficient. FOR is used when you know how.
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
1 Debugging and Syntax Errors in C++. 2 Debugging – a process of finding and fixing bugs (errors or mistakes) in a computer program.
ITP © Ron Poet Lecture 7 1 Repetition. ITP © Ron Poet Lecture 7 2 Easing Repetitive Tasks  Many computing task are repetitive.  Checking all known foods.
Review while loops Control variables Example Infinite loop
NETBEANS DEBUGGER.  To create a breakpoint place the cursor at the desired location.  Go to the Run -> toogle line Breakpoint or Ctrl +F8. It creates.
Agenda Perform Quiz #1 (20 minutes) Loops –Introduction / Purpose –while loops Structure / Examples involving a while loop –do/while loops Structure /

Introduction to Computer Programming - Project 2 Intro to Digital Technology.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Factorization : Difference of Two Squares and Perfect Squares.
CHAPTER 10 ERROR HANDLING & DEBUGGING JavaScript can be hard to learn. Everyone makes mistakes when writing it.
3:00. 2:59 2:58 2:57 2:56 2:55 2:54 2:53 2:52.
AVCE ICT – Unit 7 - Programming Session 12 - Debugging.
IST 210: PHP LOGIC IST 210: Organization of Data IST210 1.
An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)
Chapter 7 What’s Wrong with It? (Syntax and Logic Errors) Clearly Visual Basic: Programming with Visual Basic nd Edition.
THE MOUSE Left Click THE MOUSE Right Click.
FOP: While Loops.
Testing and Debugging.
Computer Programming I
Top Fire Protection Services Ottawa available on Dubinskyconstruction
BBC Microbit.
LOOK AT THIS PICTURE FOR FIVE SECONDS
Creating Variables Output Logic flow Operators (More) Basic blocks
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Tonga Institute of Higher Education
Debugging Taken from notes by Dr. Neil Moore
Global Challenge Flashing Wheels Lesson 3.
Do … Loop Until (condition is true)
مديريت موثر جلسات Running a Meeting that Works
What's wrong with Easter jokes? They crack you up
Global Challenge Flashing Wheels Lesson 3.
Debugging Taken from notes by Dr. Neil Moore
Global Challenge Flashing Wheels Lesson 3.
CS 106 Computing Fundamentals II Chapter 69 “Event Loop”
jGRASP editor-syncrasies (idiosyncrasies)
Global Challenge Flashing Wheels Lesson 3.
CLICK TO START.
© A+ Computer Science -
GCSE Computing:: While Loops
CLICK TO START.
Global Challenge Flashing Wheels Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
SEQUENCE Start Initial situation Step 1 Step 2 Step 3 End
while Loops Looping Control Statement
Call Now : Click : -
Call Now : Click : -
Call Now : Click : -
Global Challenge Flashing Wheels Lesson 3.
Presentation transcript:

Hints on debugging

Procedure of debugging 1. Set debugging point 2. Run the program 3. The program will stop at the debugging point (otherwise something must be wrong before your debugging point). 4. Point to variables you want to check (use the mouse). 5. Continue, pause, and stop

Continue, pause, and stop Continue: go to the next debugging point (or ends the program if there’s no more point). Pause: pause the program at where it is (you can try it in an infinite loop). Stop: ends the program and the debugging. When you cannot run the program, you should try to stop the program first.

Debug when the program asks you so Click debug if you encounter: Then: