Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Hands on Debugging in C and C++
Bestseller
Highest Rated
Rating: 4.6 out of 5(347 ratings)
2,275 students

Hands on Debugging in C and C++

GDB, Valgrind, and the skills you need to program error free!
Created byMike Shah
Last updated 11/2024
English

What you'll learn

  • How to debug using a debugger like GDB
  • How to detect memory leaks using valgrind
  • How to log errors and get input from a running program.
  • Learn additional debugging tools (sanitizers, tracing tools, and static analysis tools)

Course content

17 sections71 lectures5h 4m total length
  • Introduction to Debugging1:14

    Welcome to Hands on Debugging in C and C++. This is the course I believe that everyone should have almost as soon as they learn the C or C++ programming languages. 

    In this course we are going to learn how to find, debug, and fix errors in our code. We will look at C and C++ examples for the code we debug.

    Note: This is not a C or C++ course, but you should be familiar with one language or the other to get the most out of this course.

    Please check out my other Udemy courses on the associated languages if you'd like to learn more!

  • A Working Example in GDB6:10

    In this lesson I show you a working example of what you will learn in this course.

    Just sit back and relax for now and you'll see a couple of the fundamental skills that you'll be learning in this course!

    When you complete this course, you can revisit this video to refresh on all of the skills that you have learned.

  • Course Objectives1:08

    In this lesson I want to just make clear a few of the key course objectives that you will be learning in this course. This is a hands on course, so we'll learn how to use GDB, learn some debugging techniques, and ultimately you will practice and follow along with me as you learn new tools.

  • A story about the first bug2:29

    An enlightening story about Dr. Admiral Grace Hopper!

    Note: The origin of the word 'bug' is actually a bit older, but I believe Grace Hopper (who should be a household name!) popularized the term for computer programmers.

  • Write your code neatly!1:41

    One of the first steps to avoiding creating bugs is to write your code neatly. Indentation errors can make your own code harder to read, or someone else. Do make use of your editors refactoring tools, or otherwise get in the habit of writing nice code!

    • A tool like 'indent' on Unix can be used to quickly style code.

  • GDB for D, Objective-C, OpenCL, Rust, etc?0:55

    While this course is going to focus on examples specific to GDB's usage with C and C++ code, keep in mind that GDB supports many languages. So the skills you learn in this course are applicable to many languages, and you can follow along or revisit these lessons in other languages that you use.

  • Resources0:08

    Some resources and code examples used in this course. You are otherwise encouraged to use your own examples, and write small files to play around with.

Requirements

  • Previous experience programming in a language such as C, C++, or any similar language (e.g. DLang)

Description

Overview

**Newly revamped in 2024 with twice the content, and higher quality videos!**

In this course you will learn how to use the popular debugger GDB to find errors in your C and C++ code.  Learning how to use a debugger will allow you to save time when finding errors and spend more time building better software. Being able to debug code is a necessary skill for all software developers to have, and you need nothing more than a terminal window to do so. The lessons learned from this course however will go behind the GDB debugger, and even show you a few other great tools like valgrind for finding bugs in your code.

Topics you'll learn

Students should take this course if they want to learn:

  • How to use the popular GDB debugger

  • General debugging techniques, and why certain bugs occur

  • Some more advanced topics like reverse-debugging writing scripts for debugging not covered in other basic courses.

Why you should take this course?

Learning how to use a debugger will at first challenge conventional 'printf' debugging strategies that you may be able to get away with. But as you build larger software and work on software with larger teams, it will become essential to learn how to find and fix bugs. With this course and some practice, you will be able to work more quickly and save time fixing bugs, and then can spend your other efforts building great software. I can recall several instances when I first started working as a software engineer, and it took me weeks to find and fix a single bug. Had I better debugging skills at the time, I could have saved myself (and the company) a lot more time (and myself pain!). So unlock your full debugging potential by taking this course!

Who am I?

I have been teaching for over 10 years in universities and as a professor. I have worked in industry in big companies, startups, and as a consultant. I am looking forward to being your instructor for this course, and I hope you will get great value out of the lessons learned!

Who this course is for:

  • Beginning C and C++ Programmers
  • Intermediate Programmers who need to learn debugging to save time!