Simon Willison’s Weblog

Subscribe

22nd March 2021

TIL Tracing every executed Python statement — Today I learned how to use the Python [trace module](https://docs.python.org/3/library/trace.html) to output every single executed line of Python code in a program - useful for figuring out exactly when a crash or infinite loop happens.

Recent articles

This is a beat by Simon Willison, posted on 22nd March 2021.

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe