PyTrace is written on the top of Bdb that will execute small python programs within a sandbox environment and collects heap & stack information on each setup. Collected information can be later used to demonstrate program execution on GUI. Thanks for checking it out.
pip install git+https://github.com/uadnan/pytrace
import pytrace
traces = pytrace.trace("<PYTHON SCRIPT TO VISUALIZE>")
print(traces)Returned traces can't be directly converted to JSON using json.dumps, instead use pytrace.json.dumps
from pytrace.json import dumps
traces_json = dumps(traces)
print(traces_json)