René's URL Explorer Experiment


Title: Python Basics: Finding and Fixing Code Bugs (Summary) (Video) – Real Python

Open Graph Title: Python Basics: Finding and Fixing Code Bugs (Summary) – Real Python

Description: Congratulations. You’ve made it to the end of this Python Basics course about finding and fixing code bugs. Did you see how you just fixed that code bug? Nice work. While going through the lessons of this course, you first learned about how to use…

Open Graph Description: Congratulations. You’ve made it to the end of this Python Basics course about finding and fixing code bugs. Did you see how you just fixed that code bug? Nice work. While going through the lessons of this course, you first learned about how to use…

Opengraph URL: https://realpython.com/lessons/python-basics-code-bugs-summary/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "name": "Python Basics: Finding and Fixing Code Bugs (Summary)",
    "description": "Congratulations. You’ve made it to the end of this Python Basics course about finding and fixing code bugs. Did you see how you just fixed that code bug? Nice work. While going through the lessons of this course, you first learned about how to use…",
    "thumbnailUrl": ["https://files.realpython.com/media/Finding-and-Fixing-Code-Bugs_Watermarked.0c18c5fbaf79.jpg"],
    "uploadDate": "2022-08-02T14:00:00+00:00",
    "duration": "PT4M7S",
    
    "potentialAction": {
      "@type": "SeekToAction",
      "target": "https://realpython.com/lessons/python-basics-code-bugs-summary/#t={seek_to_second_number}",
      "startOffset-input": "required name=seek_to_second_number"
    }
  }
  

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Finding-and-Fixing-Code-Bugs_Watermarked.0c18c5fbaf79.jpg
og:imagehttps://files.realpython.com/media/Finding-and-Fixing-Code-Bugs_Watermarked.0c18c5fbaf79.jpg
twitter:creator@realpython
og:typevideo.episode

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/lessons/python-basics-code-bugs-summary/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/lessons/python-basics-code-bugs-summary/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Flessons%2Fpython-basics-code-bugs-summary%2F
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-basics-code-bugs
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson&utm_content=python-basics-code-bugs
https://realpython.com/courses/python-basics-code-bugs/#team
Python Basics: Finding and Fixing Code Bugshttps://realpython.com/courses/python-basics-code-bugs/
Martin Breusshttps://realpython.com/courses/python-basics-code-bugs/#team
Recommended Tutorialhttps://realpython.com/python-debug-idle/
Course Slides (.pdf)https://realpython.com/courses/python-basics-code-bugs/downloads/python-basics-code-bugs-slides/
Sample Code (.zip)https://realpython.com/courses/python-basics-code-bugs/downloads/python-basics-code-bugs-code/
Ask a Questionhttps://realpython.com/lessons/python-basics-code-bugs-summary/#discussion
https://realpython.com/feedback/survey/course/python-basics-code-bugs/liked/?from=lesson-title
https://realpython.com/feedback/survey/course/python-basics-code-bugs/disliked/?from=lesson-title
Contentshttps://realpython.com/lessons/python-basics-code-bugs-summary/#description
Transcripthttps://realpython.com/lessons/python-basics-code-bugs-summary/#transcript
Discussion (4)https://realpython.com/lessons/python-basics-code-bugs-summary/#discussion
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson_preview&utm_content=python-basics-code-bugs
Sign-Inhttps://realpython.com/account/login/
Unlock This Lessonhttps://realpython.com/account/join/?utm_source=rp_lesson_preview&utm_content=python-basics-code-bugs
Sign-Inhttps://realpython.com/account/login/
00:00https://realpython.com/lessons/python-basics-code-bugs-summary/#t=0.51
Congratulations.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=0.51
You’ve made it to the end of this Python Basics course about finding and fixinghttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=1.45
code bugs. Did you see how you just fixed that code bug? Nice work.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=5.74
00:12https://realpython.com/lessons/python-basics-code-bugs-summary/#t=12.6
While going through the lessons of this course,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=12.6
you first learned about how to use IDLE’s Debug Control window,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=14.65
and then you practiced debugging on a buggy function.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=18.53
00:23https://realpython.com/lessons/python-basics-code-bugs-summary/#t=23.26
To get started with IDLE’s Debug Control window,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=23.26
you first need to open it, and you can do that from the interactive window byhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=25.74
going to the menu option Debughttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=30.08
and then click Debugger. That opens up the Debug Control window.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=31.82
00:36https://realpython.com/lessons/python-basics-code-bugs-summary/#t=36.3
And you will also see that there’s the string [DEBUG ON] displayed in thehttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=36.3
prompt of your interactive window. Once you see that, you knowhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=41.19
you’re good and you can get started debugging.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=44.63
00:49https://realpython.com/lessons/python-basics-code-bugs-summary/#t=49.34
You then also learned about the user interface elements in IDLE’s,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=49.34
Debug Control window.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=53.04
You learned about the different buttons—Step, Out, Over,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=54.46
Go, and Quit—of which Step is the one that goes line by line, Outhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=58.85
takes you out of a function, Over steps over a certain function,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=63.8
Go runs until the next breakpoint, and Quit stops the debugger withouthttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=68.69
exiting the Debug Control window.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=73.22
01:16https://realpython.com/lessons/python-basics-code-bugs-summary/#t=76.69
You learned about the four checkboxes on the top-https://realpython.com/lessons/python-basics-code-bugs-summary/#t=76.69
right of the Debug Control window. Those are Stack, Locals,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=79.5
Globals, and Source, of which three of those are directly related tohttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=83.57
a panel in the Debug Control window. Those are Stack, Locals, and Globals.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=88.54
01:33https://realpython.com/lessons/python-basics-code-bugs-summary/#t=93.64
And you also learned about what you can see inside of these panels while youhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=93.64
debug your program.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=97.81
01:41https://realpython.com/lessons/python-basics-code-bugs-summary/#t=101.09
Then you learned about the four debugging steps.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=101.09
You start by guessing where the bug is located.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=103.96
Then you set a breakpoint and inspect the code.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=106.89
You identify the error and attempt to fix it.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=110.16
01:52https://realpython.com/lessons/python-basics-code-bugs-summary/#t=112.88
And then you repeat steps one to three until the error is actually fixed.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=112.88
After going over these four steps in theory,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=118.18
you also practiced them on a buggy program. And the buggyhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=121.11
program you worked with had a function called add_underscores() that takes ahttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=125.97
string and should return a string with each character separated withhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=129.93
underscores.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=133.6
02:14https://realpython.com/lessons/python-basics-code-bugs-summary/#t=134.55
Instead, it only returned the final letter and an underscore.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=134.55
So you went into this buggy program and worked on fixing it,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=139.46
following the four steps, and you managed to debug it,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=143.12
which means that the actual output was the same as the expected output,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=147.41
and you have a non-buggy program at the end. Yay! Congratulations.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=152.05
02:38https://realpython.com/lessons/python-basics-code-bugs-summary/#t=158.59
Finally also learned about print debugging,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=158.59
which means adding print() calls to inspect variables at different states of yourhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=161.17
program.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=165.48
And you learned that this can be useful in systems with limited resources,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=166.62
for example IoT devices,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=170.97
if they don’t have a debugger that’s available to you. However,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=173.13
it means there’s more code to write for you.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=176.93
02:59https://realpython.com/lessons/python-basics-code-bugs-summary/#t=179.42
It means that you always need to run the whole program to see the output.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=179.42
And you also need to remember to remove the print() calls afterwards.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=183.54
03:06https://realpython.com/lessons/python-basics-code-bugs-summary/#t=186.82
So if you can, use a debugger. While using IDLE’s debugger,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=186.82
you might have noticed that you weren’t able to interact with the variableshttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=191.37
inside of your program. You were just able to view them.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=195.69
03:18https://realpython.com/lessons/python-basics-code-bugs-summary/#t=198.77
Now there’s also something called interactive debuggers, and Python’s standardhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=198.77
library comes with one of them and that one is called Pdb. Real Python hashttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=202.5
also resources on working with Pdb,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=207.37
So if you’re interested in diving deeper into debugging,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=210.36
check out this course on Python Debugging With Pdbhttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=213.71
03:38https://realpython.com/lessons/python-basics-code-bugs-summary/#t=218.58
and the associated tutorial that is also about debugging in Python usinghttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=218.58
Pdb. And one final thing I want say:https://realpython.com/lessons/python-basics-code-bugs-summary/#t=223.7
even though you can be harsh to bugs inside of your code,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=226.74
and some people like to talk about squashing them,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=230.65
just keep in mind that real-life bugs are actually really cute and you don’t want tohttps://realpython.com/lessons/python-basics-code-bugs-summary/#t=233.26
hurt those. All right,https://realpython.com/lessons/python-basics-code-bugs-summary/#t=237.18
thanks for joining me in this course on finding and fixing code bugs.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=239.21
04:03https://realpython.com/lessons/python-basics-code-bugs-summary/#t=243.33
I hope you learned something, and see you the next time.https://realpython.com/lessons/python-basics-code-bugs-summary/#t=243.33
Aug. 5, 2022https://realpython.com/lessons/python-basics-code-bugs-summary/#comment-1c94596b-5bf5-46ac-8a06-4d22da140088
Aug. 5, 2022https://realpython.com/lessons/python-basics-code-bugs-summary/#comment-fbb52d04-9115-413b-9484-7e0011810f95
Python Basicshttps://realpython.com/products/python-basics-book/
video courseshttps://realpython.com/lessons/write-python-script/
Aug. 6, 2022https://realpython.com/lessons/python-basics-code-bugs-summary/#comment-fbf55430-6a1d-4813-a7f1-eaa4d3590860
Aug. 11, 2022https://realpython.com/lessons/python-basics-code-bugs-summary/#comment-4bd0ba04-0c8d-4ff5-867e-15a0e6153e8e
Become a Memberhttps://realpython.com/account/join/
https://realpython.com/lessons/python-basics-code-bugs-quiz/
Overviewhttps://realpython.com/courses/python-basics-code-bugs/
Python Basics: Finding and Fixing Code Bugs (Overview) 01:12 https://realpython.com/videos/python-basics-code-bugs-overview/
IDLE's Debug Control Window 06:40 https://realpython.com/videos/idle-debug-control/
The Step, Out, and Over Buttons 08:24 https://realpython.com/lessons/step-out-over/
Breakpoints, Go, and Quit 04:44 https://realpython.com/lessons/breakpoints-go-quit/
A Buggy Program 03:39 https://realpython.com/lessons/buggy-program/
Step 1: Guess 02:04 https://realpython.com/lessons/step-one-guess/
Step 2: Set a Breakpoint and Inspect 04:00 https://realpython.com/lessons/step-two-breakpoint/
Step 3: Identify and Fix 01:27 https://realpython.com/lessons/step-three-identify-fix/
Step 4: Repeat 02:32 https://realpython.com/lessons/step-four-repeat/
Print Debugging 03:51 https://realpython.com/lessons/print-debugging/
Python Basics: Finding and Fixing Code Bugs (Quiz) 04:30 https://realpython.com/lessons/python-basics-code-bugs-quiz/
Python Basics: Finding and Fixing Code Bugs (Summary) 04:07 https://realpython.com/lessons/python-basics-code-bugs-summary/
Privacy Policyhttps://realpython.com/privacy-policy/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.