python - Execution Code Tracking - How to know which code has been executed in project? -
let have open source project borrow functionality. can sort of report generated during execution and/or interaction of project?
report should contain e.g.:
- which functions has been called,
- in order,
- which classes has been instantiated etc.?
would nice have graphic output that... know, if else tree , highlighted executed branch etc.
i interested in python , c (perl fine too) if there universal tool cover multiple languages (or 1 tool per language) that, nice.
ps: familiar debuggers not want step every singe line of code , check if correct instruction. i'm assuming if functions/methods/classes etc. named 1 can hints find desired piece of code. naming not enough because not know (from brief overview of code) if looking function foo() not require data generated obscure function bar() etc. reason looking can visualize relations between running code.
ps: not know if question or programmers.stackexchange. feel free move if wish. ps: i've noticed tags i've used not recommended execution flow tracking best phrase describe process
check out ned batchelder's coverage , perhaps graphviz/dot library called pycallgraph. may not need , (python-only) in ballpark.
pycallgraph likelier of interest because shows execution path, not codelines got executed. renders pdf normally, wasn't difficult svg instead (dot/graphviz supports svg , other formats, pycallgraph hardcoding pdf rendering).
neither want start.
Comments
Post a Comment