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

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
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