Run a script and print executed lines.

Section: Warnings and Execution Traces

Trace executed lines

bash
bash
python -m trace --trace app.py

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Warnings and Execution Traces
Count executed lines
Collect line execution counts for scripts.
OpenIn sheetbashsame section
Force warnings to appear
Promote useful warnings during development.
OpenIn sheetpythonsame section
Turn warnings into errors
Catch deprecated or risky behavior early.
OpenIn sheetbashsame section
Create a module logger
Use a named logger per module.
Dump traceback later with faulthandler
Emit stack traces after a timeout to catch hangs.
Log to a file
Persist logs to disk for debugging after process exit.