Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A simple tutorial about effectively using pdb
| Date | Stars |
|---|---|
| 2026-07-24 | 916 |
| 2026-07-25 | 916 |
| 2026-07-28 | 916 |
| 2026-07-30 | 916 |
| 2026-08-06 | 916 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# `pdb` Tutorial The purpose of this tutorial is to teach you the basics of `pdb`, the **P**ython **D**e**B**ugger for [Python2](https://docs.python.org/2/library/pdb.html) and [Python3](https://docs.python.org/3/library/pdb.html). It will also include some helpful tricks to make your debugging sessions a lot less stressful. --- #### Other translations The tutorial is written in english, but there are other translations available with help from the Python community: - [Korean](https://github.com/mingrammer/pdb-tutorial) - [Chinese](https://github.com/MartinLwx/pdb-tutorial) - [Russian](https://github.com/0xfadeef/pdb-tutorial) If you would like to see another other translation, or are interested in helping out with translating the tutorial, feel free to add to the [ongoing issues thread](https://github.com/spiside/pdb-tutorial/issues/9). --- The tutorial works best if you use Python 2.7 or Python 3.4 and I will highlight the differences between the two versions if a `pdb` command differs. To check what version of python you're using, type the following in your terminal: ```shell python --version ``` Now that you know your version, let's get to it! ## What is the purpose of a debugger? Before jumping into the code, we should have a brief discussion about the importance of debugging and using a debugging tool. For me, these three points highlight the importance of a debugger. With a debugger, you can: * Explore the state of a running program * Test implementation code before applying it * Follow the program's execution logic Using a debugger, you can set a [breakpoint](https://en.wikipedia.org/wiki/Breakpoint) at any point of your program to stop it and apply the three points above. Debuggers are very powerful tools and they can speed up the debugging process a lot faster than using simple `print()` statements everywhere. For those of you who are veteran programmers, you might agree with me that there is a correlation between the best programmers and the ones that know how to debug effectively. By debugging effectively, I mean being able to diagnose a problem and then treat the error with minimal difficulty. Using a debugger and learning how to use it properly will help you become an effective debugger. It will take some time before you feel comfortable navigating around in a debugging environment but the purpose of this tutorial is to get your feet wet before you start using `pdb` in your own code base! ## Playing the Game So we already talked about the purpose of a debugger and now it's time to see it in action. First, you should clone this repo if you haven't already done so. If you don't have `git` installed, I recommend using it (or some version of source control) and you can find out details on how to install `git` [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). Once you have `git` installed, clone the repo by entering the following in your terminal: ```shell git clone https://github.com/spiside/pdb-tutorial ``` **NB**: If that didn't work for you, you should follow Github's [cloning tutorial](https://help.github.com/articles/cloning-a-repository/). Now that you have the repo cloned, let's navigate to the root of the project and take a look at the instructions given: ```shell cd /path/to/pdb-tutorial ``` `file: instructions.txt` ``` Your boss has given you the following project to fix for a client. It's supposed to be a simple dice game where the objective of the game is to correctly add up the values of the dice for 6 consecutive turns. The issue is that a former programmer worked on it and didn't know how to debug effectively. It's now up to you to fix the errors and finally make the game playable. To play the game you must run the main.py file. ``` Seems easy enough! To begin, let's try playing the game to see what's wrong. To run the program, type the following in your terminal: ```shell python main.py ``` You should see something like this: ``` Add the values of
Excerpt of 28,580 characters
Read on GitHub12
3
2
2
1
1
Alfredo Canziani · NYU · United States
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:90aee6faca925266, topic:tutorial, name:tutorial, desc:tutorial