Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By kangtegongv0.4.1MITIn 1 marketplace
Shows the call tree of a Python program with arguments, return values and exceptions, to find why a result is wrong or a run is slow. Requires Python 3.8+.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
pyftrace is a lightweight Python function tracing tool designed to monitor and report on function calls within Python scripts. It leverages sys.setprofile(Python 3.8 ~ 3.11), sys.monitoring(Python 3.12 ~) to monitor Python events and trace functions based on the results. With pyftrace, you can trace function calls across multiple modules, visualize call hierarchies, and generate execution time reports.

Key features of pyftrace include:
print using the --verbose flag.--report flag.--path flag.tui command.multiprocessing or os.fork(). Their lines are marked with [tid N] and [pid N].--function and --exclude-function flag.$ pyftrace --help
usage: pyftrace [options] [tui] (script | -m module) [args ...]
pyftrace: Python function tracing tool.
positional arguments:
script Path to the script to run and trace. Specify 'tui' before the script path to run in TUI mode.
options:
-h, --help show this help message and exit
-V, --version Show the version of pyftrace and exit
-v, --verbose Enable built-in and third-party function tracing
-p, --path Show file paths in tracing output
-r, --report Generate a report of function execution times
-d DEPTH, --depth DEPTH
Limit the tracing output to DEPTH
-n LINES, --max-lines LINES
Stop printing the trace after LINES lines. The program keeps running
-c, --collapse Print a call that repeats the one before it only once, followed by a repeat count
-f FUNCTION, --function FUNCTION
Trace only calls of <function> and its subcalls. Can be repeated
-e EXCLUDE_FUNCTION, --exclude-function EXCLUDE_FUNCTION
Exclude calls of <function> (and its subcalls) from tracing. Can be repeated
-F PATH, --file PATH Trace only functions defined in PATH: a file, a directory, a glob or a module name. Can be repeated
-E PATH, --exclude-file PATH
Do not trace functions defined in PATH. Can be repeated
-a, --argument Show function arguments in tracing output (Python frames only)
--format {json,text} Output format: 'text' (default) or 'json', one JSON object per line
-o OUTPUT, --output OUTPUT
Write tracing output to a file. The traced program's own output is not redirected
-m MODULE Run and trace a library module as a script, like 'python -m'.
Everything after MODULE is passed to the module.
$ pyftrace [options] /path/to/python/script.py
$ git clone https://github.com/kangtegong/pyftrace.git
$ cd pyftrace
$ pip install -e .
or
$ pip install pyftrace
note: on Windows, windows-curses is required.
pyftrace ships a skill that teaches a coding agent when and how to trace a program: how to keep the output short, how to read it, and which options answer which question.
For Claude Code, install the skill as a plugin. At the prompt of a session:
/plugin install pyftrace --marketplace kangtegong/pyftrace
or from a shell:
$ claude plugin install pyftrace --marketplace kangtegong/pyftrace
/plugin exists only in Claude Code in a terminal. In the VS Code
extension and other places where it answers "/plugin isn't available in
this environment", use the shell command; the skill is picked up by the
sessions started after it.
Other agents can read skills/pyftrace/SKILL.md directly; copy it to wherever the agent looks for skills or instructions.
The plugin installs only the skill. The agent still needs the
pyftrace command (0.4.0 or later) in the environment the project
runs in: pip install -U pyftrace.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub kangtegong/pyftrace --plugin pyftracePlugins from other owners that cover similar ground