Debugging at Scale.

Slides:



Advertisements
Similar presentations
Basics of Recursion Programming with Recursion
Advertisements

Lecture 10 Flow of Control: Loops (Part 2) COMP1681 / SE15 Introduction to Programming.
Georgia Institute of Technology DrJava Appendix A Barb Ericson Georgia Institute of Technology May 2006.
BIM313 – Advanced Programming Techniques Debugging 1.
Debugging Introduction to Computing Science and Programming I.
General Computer Science for Engineers CISC 106 Lecture 21 Dr. John Cavazos Computer and Information Sciences 04/10/2009.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Visual Basic Debugging Tools Appendix D 6/27/20151Dr. Monther Aldwairi.
1 Gentle Introduction to Programming Tirgul 2: Scala “hands on” in the lab.
DEBUGGERS For CS302 Data Structures Course Slides prepared by TALHA OZ (most of the text is from
Gdb is the GNU debugger on our CS machines. gdb is most effective when it is debugging a program that has debugging symbols linked in to it. With gcc and.
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Compilers, Interpreters and Debuggers Ruibin Bai (Room AB326) Division of Computer Science.
Homework Reading Programming Assignments
Structured programming 4 Day 34 LING Computational Linguistics Harry Howard Tulane University.
Debugging !!!  ► Believe it or not, errors happen ► The most frustrating part of programming ► Hunting down an error can be harder and more time consuming.
Shell Scripting Introduction. Agenda What is Shell Scripting? Why use Shell Scripting? Writing and Running a Shell Script Basic Commands -ECHO - REM.
Compiling & Debugging Quick tutorial. What is gcc? Gcc is the GNU Project C compiler A command-line program Gcc takes C source files as input Outputs.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
CPSC1301 Computer Science 1 Overview of Dr. Java.
Introduction to MATLAB Session 3 Simopekka Vänskä, THL Department of Mathematics and Statistics University of Helsinki 2011.
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.
VB – Debugging Tools Appendix D. Why do we need debugging? Every program has errors, and the process of finding these errors is debugging Types of errors.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
MIPS coding. slt, slti slt $t3, $t1, $t2 – set $t3 to be 1 if $t1 < $t2 ; else clear $t3 to be 0. – “Set Less Than.” slti $t3, $t1, 100 – set $t3 to be.
ENEE150 – 0102 ANDREW GOFFIN Testing and Debugging.
Structured Programming: Debugging and Practice by the end of this class you should be able to: debug a program using echo printing debug a program using.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
Debugging Visual Basic.NET Programs ► ► Use debugging tools ► ► Set breakpoints and correct mistakes. ► ► Use a Watch and Local window to examine variables.
A Tutorial on Introduction to gdb By Sasanka Madiraju Graduate Assistant Center for Computation and Technology.
Debugging Xin Tong. GDB GNU Project debugger Allows you to see what is going on `inside' another program while it executes or crashed. (Faster than printing.
1 SEEM3460 Tutorial Compiling and Debugging C programs.
CSE 374 Programming Concepts & Tools Hal Perkins Fall 2015 Lecture 11 – gdb and Debugging.
S OME USEFUL D EBUG C OMMANDS FOR C LEAR -S PEED S OFTWARE D EVELOPMENT K IT -- COMMANDS FROM CHAP.7 By: Pallav Laskar.
Unit - V. Debugging GNU Debugger helps you in getting information about the following: 1.If a core dump happened, then what statement or expression did.
The Whole and the Parts Chapter 13. Top-Down Design Top-Down design helps in the following ways. 1. Clarity of structure and representation makes the.
CMSC 202 Lesson 15 Debugging. Warmup  What is the bug in the following code? int* foo(int a) { return &a; }
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
Chapter 15: Recursion. Recursive Definitions Recursion: solving a problem by reducing it to smaller versions of itself – Provides a powerful way to solve.
1 Advanced.Net Debugging Using Visual Studio, R# and OzCode IT Week, Summer 2015.
Debugging Lab Antonio Gómez-Iglesias Texas Advanced Computing Center.
Introducing Python 3 Introduction to Python. Introduction to Python L1 Introducing Python 3 Learning Objectives Know what Python is and some of the applications.
FOP: While Loops.
Appendix A Barb Ericson Georgia Institute of Technology May 2006
Introduction to Computing Science and Programming I
Winter 2009 Tutorial #6 Arrays Part 2, Structures, Debugger
14 Compilers, Interpreters and Debuggers
Appendix A Barb Ericson Georgia Institute of Technology May 2006
CSE 374 Programming Concepts & Tools
Testing and Debugging.
COMP280:Introduction to Software Development Week 12, Lecture 34
LESSON 20.
Scripts & Functions Scripts and functions are contained in .m-files
gdb gdb is the GNU debugger on our CS machines.
Debuggers.
File Handling Programming Guides.
DEBUGGING JAVA PROGRAMS USING ECLIPSE DEBUGGER
Chief Software Engineer
Debugging CSCE 121 J. Michael Moore.
Tonga Institute of Higher Education
CSE 403 Lecture 17 Coding.
Using a Debugger 1-Jan-19.
File Handling in Java January 19
Testing, debugging, and using support libraries
Homework Applied for cs240? (If not, keep at it!) 8/10 Done with HW1?
Python programming exercise
Debugging “Why you were up till 2AM”
Debugging Visual Basic Programs
Debugging.
Workshop for Programming And Systems Management Teachers
Presentation transcript:

Debugging at Scale

How to Debug At Scale Lesson 1: Don’t Test with small problems first Try to reproduce big problems at small scale In a big program, comment out parts, slowly add them back

How to Debug At Scale Lesson 2: Location of Bug != Location of Error This code crashes on line 25 Where is the bug?

How to Debug At Scale Lesson 2: Location of Bug != Location of Error Error prone code Pointing to things (what is lifespan of thing?) Deleting memory Copying things (deep copy??) What error prone code ran shortly before the bug?

How to Debug At Scale Lesson 2: Location of Bug != Location of Error Finding your error Run in debug mode so you know where you crash Put in break points or print statements to see: How far you get If your data is still valid Use binary search

How to Debug At Scale Lesson 3: Conditional Breakpoints Ignore first X hits of breakpoint Stop when code expression is true

How to Debug At Scale Lesson 4: Print It Out Reading a log can be easier than using debugger Print out Entering a particular function All parameters to each recursive call All information about current loop iteration Redirect output to a text file: myProgram.exe > output.txt

How to Debug At Scale Print It Out Tip Make a log function: You can turn off: