Do you ever use print() or log() to debug your code? Of course you do. IceCream, or ic for short, makes print debugging a little sweeter. With arguments, ic() inspects itself and prints both its own arguments and the values of those arguments. Just give ic() a variable or expression and you're done. ic() returns its argument(s), so ic() can easily be inserted into pre-existing code. Additionally, ic()'s output can be entirely disabled, and later re-enabled, with ic.disable() and ic.enable() respectively. ic() continues to return its arguments when disabled, of course; no existing code with ic() breaks. To make ic() available in every file without needing to be imported in every file, you can install() it. ic() can also be imported in a manner that fails gracefully if IceCream isn't installed, like in production environments (i.e. not development).

Features

  • Prints both expressions/variable names and their values
  • It's 40% faster to type
  • Data structures are pretty printed
  • Output is syntax highlighted
  • It optionally includes program context

Project Samples

Project Activity

See All Activity >

Categories

Debuggers

License

MIT License

Follow IceCream

IceCream Web Site

Other Useful Business Software
Train ML Models With SQL You Already Know Icon
Train ML Models With SQL You Already Know

BigQuery turns your data warehouse into an AI platform. No new languages required.

Build and deploy ML models using familiar SQL. Automate data prep with built-in Gemini. Query 1 TB and store 10 GB free monthly.
Try Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of IceCream!

Additional Project Details

Programming Language

Python

Related Categories

Python Debuggers

Registered

2021-12-17