debug.md
1> **Источник:** https://python-all.ru/3.5/library/debug.html2>3> «Документация Python на русском» – неофициальный перевод официальной документации Python: версии от 2.6 до 3.16, полнотекстовый поиск, английский оригинал рядом с переводом. Эта Markdown-версия страницы предназначена для работы с LLM: вставьте её в ChatGPT, Claude или Cursor.45---67# 27. Отладка и профилирование89Эти библиотеки помогают в разработке на Python: отладчик позволяет пошагово выполнять код, анализировать стек вызовов и устанавливать точки останова и т.д., а профилировщики выполняют код и предоставляют подробные результаты по времени выполнения, что помогает выявить узкие места в программах.1011- [27.1. `bdb` – Фреймворк отладчика](https://python-all.ru/3.5/library/bdb.html)12- [27.2. `faulthandler` – Дамп трассировки Python](https://python-all.ru/3.5/library/faulthandler.html)1314 - [27.2.1. Дамп трассировки](https://python-all.ru/3.5/library/faulthandler.html#dumping-the-traceback)15 - [27.2.2. Состояние обработчика сбоев](https://python-all.ru/3.5/library/faulthandler.html#fault-handler-state)16 - [27.2.3. Дамп трассировок после тайм-аута](https://python-all.ru/3.5/library/faulthandler.html#dumping-the-tracebacks-after-a-timeout)17 - [27.2.4. Дамп трассировки по пользовательскому сигналу](https://python-all.ru/3.5/library/faulthandler.html#dumping-the-traceback-on-a-user-signal)18 - [27.2.5. Проблема с файловыми дескрипторами](https://python-all.ru/3.5/library/faulthandler.html#issue-with-file-descriptors)19 - [27.2.6. Пример](https://python-all.ru/3.5/library/faulthandler.html#example)20- [27.3. `pdb` – Отладчик Python](https://python-all.ru/3.5/library/pdb.html)2122 - [27.3.1. Команды отладчика](https://python-all.ru/3.5/library/pdb.html#debugger-commands)23- [27.4. Профилировщики Python](https://python-all.ru/3.5/library/profile.html)2425 - [27.4.1. Введение в профилировщики](https://python-all.ru/3.5/library/profile.html#introduction-to-the-profilers)26 - [27.4.2. Краткое руководство пользователя](https://python-all.ru/3.5/library/profile.html#instant-user-s-manual)27 - [27.4.3. Справочник по модулям `profile` и `cProfile`](https://python-all.ru/3.5/library/profile.html#module-cProfile)28 - [27.4.4. Класс `Stats`](https://python-all.ru/3.5/library/profile.html#the-stats-class)29 - [27.4.5. Что такое детерминированное профилирование?](https://python-all.ru/3.5/library/profile.html#what-is-deterministic-profiling)30 - [27.4.6. Ограничения](https://python-all.ru/3.5/library/profile.html#limitations)31 - [27.4.7. Калибровка](https://python-all.ru/3.5/library/profile.html#calibration)32 - [27.4.8. Использование пользовательского таймера](https://python-all.ru/3.5/library/profile.html#using-a-custom-timer)33- [27.5. `timeit` – Измерение времени выполнения небольших фрагментов кода](https://python-all.ru/3.5/library/timeit.html)3435 - [27.5.1. Основные примеры](https://python-all.ru/3.5/library/timeit.html#basic-examples)36 - [27.5.2. Интерфейс Python](https://python-all.ru/3.5/library/timeit.html#python-interface)37 - [27.5.3. Интерфейс командной строки](https://python-all.ru/3.5/library/timeit.html#command-line-interface)38 - [27.5.4. Примеры](https://python-all.ru/3.5/library/timeit.html#examples)39- [27.6. `trace` – Трассировка или отслеживание выполнения инструкций Python](https://python-all.ru/3.5/library/trace.html)4041 - [27.6.1. Использование командной строки](https://python-all.ru/3.5/library/trace.html#command-line-usage)4243 - [27.6.1.1. Основные параметры](https://python-all.ru/3.5/library/trace.html#main-options)44 - [27.6.1.2. Модификаторы](https://python-all.ru/3.5/library/trace.html#modifiers)45 - [27.6.1.3. Фильтры](https://python-all.ru/3.5/library/trace.html#filters)46 - [27.6.2. Программный интерфейс](https://python-all.ru/3.5/library/trace.html#programmatic-interface)47- [27.7. `tracemalloc` – Трассировка выделений памяти](https://python-all.ru/3.5/library/tracemalloc.html)4849 - [27.7.1. Примеры](https://python-all.ru/3.5/library/tracemalloc.html#examples)5051 - [27.7.1.1. Отображение топ-10](https://python-all.ru/3.5/library/tracemalloc.html#display-the-top-10)52 - [27.7.1.2. Вычисление различий](https://python-all.ru/3.5/library/tracemalloc.html#compute-differences)53 - [27.7.1.3. Получение трассировки блока памяти](https://python-all.ru/3.5/library/tracemalloc.html#get-the-traceback-of-a-memory-block)54 - [27.7.1.4. Удобный топ](https://python-all.ru/3.5/library/tracemalloc.html#pretty-top)55 - [27.7.2. API](https://python-all.ru/3.5/library/tracemalloc.html#api)5657 - [27.7.2.1. Функции](https://python-all.ru/3.5/library/tracemalloc.html#functions)58 - [27.7.2.2. Фильтр](https://python-all.ru/3.5/library/tracemalloc.html#filter)59 - [27.7.2.3. Фрейм](https://python-all.ru/3.5/library/tracemalloc.html#frame)60 - [27.7.2.4. Снимок](https://python-all.ru/3.5/library/tracemalloc.html#snapshot)61 - [27.7.2.5. Статистика](https://python-all.ru/3.5/library/tracemalloc.html#statistic)62 - [27.7.2.6. Разница статистик](https://python-all.ru/3.5/library/tracemalloc.html#statisticdiff)63 - [27.7.2.7. Трассировка](https://python-all.ru/3.5/library/tracemalloc.html#trace)64 - [27.7.2.8. Обратная трассировка](https://python-all.ru/3.5/library/tracemalloc.html#traceback)65