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
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI Studio. Switch between models without switching platforms.
Start 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