Python debugging, redefined.
Cyberbrain: Python debugging, redefined.
Cyberbrain is a Python debugging solution aiming to free programmers. It visualizes program execution and how each variable changes.
Never spend hours stepping through a program, let Cyberbrain tell you.
Cyberbrain consists of a Python library and various editor/IDE integrations. Currently VS Code is the only supported editor, but we have plans to expand the support.
To install Cyberbrain:
pip install cyberbrain
code --install-extension laike9m.cyberbrain
How to Use
Suppose you want to trace a function called
foo, just decorate it with
from cyberbrain import trace
@trace # You can disable tracing with `@trace(disabled=True)`
Cyberbrain keeps your workflow unchanged. You run a program (from vscode or command line, both work), call "Initialize Cyberbrain" from the command palette, and a new panel will be opened to visualize how your program execution.
The following gif demonstrates the workflow:
- Dataflow analysis
- Variable tracing (try hover on any variable, it only highlights relevant variables)
- Object inspection (value is logged in the opened devtools console)
- Expect more to come 🤟
Note: Cyberbrain may conflict with other debuggers. If you set breakpoints and use VSC's debugger, Cyberbrain may not function normally. Generally speaking, prefer "Run Without Debugging" (like shown in the gif).
Status Quo and Milestones
Cyberbrain is new and under active development, bugs are expected. If you met any, I appreciate if you can create an issue. At this point, you should NOT use Cyberbrain in production.
Milestones for the project are listed below, which may change over time. Generally speaking, we'll release 1.0 when it reaches "Production ready".
|Cyberbrain works on examples (in the
|Live demo ready
|Cyberbrain can work with code you write in a live demo, in most cases
|Cyberbrain can work with most "scripting" programs
|Cyberbrain is ready to be shared on Hacker News and Reddit. Please don't broadcast Cyberbrain before it reaches this milestone.
|Cyberbrain can work with most programs in production
Note that v1.0 means Cyberbrain is stable in the features it supports, it does NOT mean Cyberbrain is feature complete. Major features planned for each future version are listed below. Again, expect it to change at any time.
|Mutual interaction between source code and the trace graph (#7)
|Fine-grained symbol tracing
|Async & multi-threading support
Visit the project's kanban to learn more about the current development schedule.
All questions & suggestions & discussions welcomed.
Interested in Contributing?
Get started here.
Cyberbrain is a long-term project, your support is critical to sustain it. Let's make it the best Python debugging tool 🤟!
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for cyberbrain-0.0.3-py3-none-any.whl