9. Debugging

9.1. print

9.2. pprint

from pprint import pprint

pprint(...)

9.3. help

name = 'Matt'
help(name)

9.4. dir() i object.__dict__

def __init__(self):
    self.first_name = 'José'
    self.last_name = 'Jiménez'


jose = Astronaut()

print(jose.__dict__)
print(dir(jose))

# {'first_name': 'José', 'last_name': 'Jiménez'}
# ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'first_name', 'last_name']

9.5. Wykorzystanie debuggera w IDE

9.5.1. Break Point

9.5.1.1. View Breakpoints

9.5.1.2. Mute Breakpoints

9.5.2. Poruszanie się

9.5.2.1. Step Over

9.5.2.2. Step Into My Code

9.5.2.3. Force Step Into

9.5.2.4. Show Execution Point

9.5.2.5. Step Out

9.5.2.6. Run to Cursor

9.5.2.7. Resume Program

9.5.2.8. New Watch

9.5.3. Frames

9.5.3.1. Previous Frame

9.5.3.2. Next Frame

9.5.3.3. Threads

9.5.4. Scope

9.5.4.1. Special Variables

  • __file__
  • __name__
  • __builtins__
  • __doc__
  • __loader__
  • __spec__
  • __package__

9.5.4.2. Moduły

9.5.4.3. Stałe

9.5.4.4. Zmienne

9.5.4.5. Wartości funkcji

9.5.5. Debugging i Wątki

9.5.6. Debugging i Procesy

9.5.7. Debugging aplikacji sieciowych

9.5.8. Wyciszanie logowania