Python Standard Library

Table of Contents

  • Ch 01 - 10
  • Ch 11 - 20
  • Ch 21 - 30
    • 21 Multimedia Services
    • 22 Internationalization
    • 23 Program Frameworks
    • 24 Graphical User Interfaces with Tk
    • 25 Development Tools
    • 26. Debugging and Profiling
      • 1. bdb — Debugger framework
      • 2. pdb — The Python Debugger
      • 3. cProfile, profile — The Python Profilers
      • 4. hotshot — High performance logging profiler
      • 5. timeit — Measure execution time of small code snippets
      • 6. trace — Trace or track Python statement execution
    • 27 Software Packaging and Distribution
    • 28 Python Runtime Services
    • 29 Custom Python Interpreters
    • 30 Restricted Execution
  • Ch 31 - 37
  • api
Python Standard Library
  • Docs »
  • Ch 21 - 30 »
  • 26. Debugging and Profiling
  • View page source

26. Debugging and Profiling¶

https://docs.python.org/2/library/debug.html

These libraries help you with Python development: the debugger enables you to step through code, analyze stack frames and set breakpoints etc., and the profilers run code and give you a detailed breakdown of execution times, allowing you to identify bottlenecks in your programs.

  • 1. bdb — Debugger framework
  • 2. pdb — The Python Debugger
    • 2.1. Debugger Commands
  • 3. cProfile, profile — The Python Profilers
    • 3.1. Introduction to the profilers
    • 3.2. Instant User’s Manual
    • 3.3. profile and cProfile Module Reference
    • 3.4. The Stats Class
    • 3.5. What Is Deterministic Profiling?
    • 3.6. Limitations
    • 3.7. Calibration
    • 3.8. Using a custom timer
  • 4. hotshot — High performance logging profiler
    • 4.1. Profile Objects
    • 4.2. Using hotshot data
    • 4.3. Example Usage
  • 5. timeit — Measure execution time of small code snippets
    • 5.1. Basic Examples
    • 5.2. Python Interface
    • 5.3. Command-Line Interface
    • 5.4. Examples
  • 6. trace — Trace or track Python statement execution
    • 6.1. Command-Line Usage
    • 6.2. Programmatic Interface
Next Previous

© Copyright 2016.

Built with Sphinx using a theme provided by Read the Docs.