Demo shows:
- Slack alert with a link to the debug state (including the full stack trace, variables, and source code)
- Web viewer to browse and analyze debug states
- LLM analysis of the root cause and fix suggestions
🔗 Try the live demo at: https://selfheal.dev/demo
- Install
pip install selfheal
- Configure
export SLACK_BOT_TOKEN="xoxb-your-token" # Optional
- Use
from selfheal import FunctionDebugger
debugger = FunctionDebugger(
dump_dir="/path/to/debug/states",
slack_token=os.environ.get("SLACK_BOT_TOKEN")
)
# Decorate functions
@debugger.debug_enabled()
def my_function():
pass
# Or entire classes
@debugger.debug_class()
class MyClass:
pass
- View Debug States
streamlit run selfheal/debug_viewer.py