Track Python programs

What i did

I checked the flow of methods and the order of execution in Python Tracing and tracking the execution of Python statements

I was able to output the relationship between the caller / callee

command

If it ’s just the relationship between function calls python -m trace -T {Program}.py

python


python -m trace {OPTION} {PROGRAM}.py

Supplement

There are various options, pick up only those that are likely to be used in the future

a a a
-c --count Create a file showing how many times each statement was executed
-C --coverdir Specify the directory to save the report file
-t --trace Show lines exactly as they were executed
-l --listfuncs View of executed function
-T --trackcalls View call relationships

There are still other options, so if you want to check in more detail To reference page

Reference page

https://docs.python.org/ja/3/library/trace.html#module-trace

Recommended Posts

Track Python programs
Python
Static analysis of Python programs
Track baseball balls with Python + OpenCV
kafka python
Python basics ⑤
python + lottery 6
Python Summary
Built-in python
Python technique
Studying python
Python 2.7 Countdown
Python memorandum
python tips
python function ①
Python basics
Python memo
ufo-> python (3)
install python
Python Singleton
Python basics ④
Python Memorandum 2
python memo
Python Jinja2
Python increment
atCoder 173 Python
[Python] function
Python installation
python tips
Installing Python 3.4.3.
Try python
Python iterative
Python algorithm
Python2 + word2vec
[Python] Variables
Python functions
Python sys.intern ()
Python tutorial
Python decimals
python underscore
Start python
[Python] Sort
Note: Python
python log
Python basics
[Scraping] Python scraping
Python update (2.6-> 2.7)
python memo
Python memorandum
Python # sort
ufo-> python
Python nslookup
[Beginner] Installing Python and running programs (Windows)
Hannari Python 2020
[Rpmbuild] Python 3.7.3.
Prorate Python (1)
python memorandum
Download python
python memorandum
Python memo
started python