Python debugging with Python PDB - commands, post mortem and much more | Python PDB tutorial

preview_player
Показать описание
This video is about how to debug Python code with standard Python Debugger or just PDB or Python PDB.
How to use PDB commands for debugging Python code.

Follow me @:

Timecodes:

00:00 - Why debugging?
01:00 - Description of the Python script under debugging
02:19 - Initial Python PDB output explanation
03:13 - Python PDB commands expanation starting
03:52 - PDB 'next' or 'n' command to jump to next line
04:57 - PDB aliases. How to create and save PDB alias in .pdbrc file
07:40 - 'p' for print, and 'pp' for pretty print for Python lists and dictionaries
09:03 - PDB Post Mortem mode
09:56 - PDB 'a' for 'args' command to see arguments of a function
10:56 - Using of PDB breakpoints and the 'c' command
12:56 - PDB watch list for breakpoint with PDB 'commands' command
15:24 - PDB 's' for 'step' [step into]
15:55 - PDB stack trace with 'where' command, 'u' and 'd' for navigating through the stack trace
17:23 - PDB interact command for Python shell
17:42 - PDB conditional breakpoint (breakpoint with a condition)

Python debugging with Python PDB - commands, post mortem and much more | Python PDB tutorial

#python #pdb #redeyedcoderclub
Рекомендации по теме
Комментарии
Автор

Honestly, I did not expect that the lesson could be so simple and clear, even for me. Thanks for the great explanation

rzuecow
Автор

I Love when YouTubers make clear tutorials! Awesome work! keep it up!

alexdin
Автор

Awesome video! Easy to follow, only the essential information. Thanks

uqwtgze
Автор

Honestly, I didn't expect the lesson to be so easy to understand, even for me. Thanks to the author for the video.

rzuecow
Автор

A great debugging lesson turned out, thank you!

houlvpd
Автор

very-very clear and simple! I used before Visual studio code, in particular for the debug. Had a lot of problem.
IDLE+PDB is the best useful kit to debug Python modules!
Thanks

valentinocristofoletto
Автор

Now I know how to use PDB commands to debug Python code.

AnnaNEast
Автор

Good video tutorial on Python, thank you very much for your work.

kostya
Автор

What video should I make next?
Follow me @:

RedEyedCoderClub
Автор

You're as legendary as Pink Floyd, so knowledgeable about Python.

EnglishRain
Автор

Python is a very powerful programming tool. It is worth studying and using in your work. And using debuggers will greatly simplify and improve the quality of work.

markbrown
Автор

Спасибо за познавательное видео!
Обычно пользуюсь PyCharm дебагом, где это и проще, и нагляднее, но давно интересовался, как работать напрямую через стандартную библиотеку (никак руки не доходили).
За студентов из группы Pink Floyd - моё почтение вдвойне)

maxzhenzhera
Автор

Олег, здравствуйте!
Смотрю ваш курс по Фласк на другом канале и нигде не могу найти ответ на вопрос.
Подскажите, пожалуйста, в чем разница между тем, как вы создавали модель для бд:
db = SQLAlchemy(app)
class Post(db.Model)...

и тем, что в интернете в статьях описывается:
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class Post(Base):

Это идентичные записи или есть какое-то отличие?
Очень тяжело разобраться, когда есть куча вариантов разных записей похожих действий)

luckcode
Автор

Олег, добрый вечер!
Очень рад, что снова нашёл вас на YouTube, у вас очень интересные и, самое главное, понятные видеоуроки без лишней информации
Подскажите пожалуйста, есть ли вы в социальных сетях?
И есть ли возможность с вами иногда консультироваться по поводу языка Python?

quickliker
Автор

I'd like to watch something about type hints 🙂

hckphy
Автор

Олег, здравствуйте!
Прошу помощи, не могу понять, что не так, странная ошибка в самом объекте pagination. Это урок по фласку, создание пагинации. Почему на фласковском объекте Pagination такая ошибка?

if q:
posts = | Post.body.contains(q)) # .all()
else:
posts =

pages = posts.paginate(page=page, per_page=5)
print(pages)
for i in pages.items():
print(i.title)

<flask_sqlalchemy.Pagination object at 0x7f7d881f1610>

File "/home/max/me/flask/app/posts/blueprint.py", line 58, in index
for i in pages.items():
TypeError: 'list' object is not callable

luckcode