Simon Willison’s Weblog

Subscribe

Items tagged python, debugging in 2024

Filters: Year: 2024 × python × debugging × Sorted by date


snoop. Neat Python debugging utility by Alex Hall: snoop lets you “import snoop” and then add “@snoop” as a decorator to any function, which causes that function’s source code to be output directly to the console with details of any variable state changes that occur while it’s running.

I didn’t know you could make a Python module callable like that—turns out it’s running “sys.modules[’snoop’] = snoop” in the __init__.py module! # 31st January 2024, 6:19 pm

Types

Years

Months

Tags