{"id":15683916,"url":"https://github.com/hallerpatrick/icecream","last_synced_at":"2025-05-07T14:40:50.982Z","repository":{"id":56832790,"uuid":"129420958","full_name":"HallerPatrick/icecream","owner":"HallerPatrick","description":"Debugging made easy again with this delicious tool!","archived":false,"fork":false,"pushed_at":"2018-06-09T14:57:22.000Z","size":1666,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-06T02:54:19.839Z","etag":null,"topics":["debugger","dev-tool","development","easy"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HallerPatrick.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-13T15:28:33.000Z","updated_at":"2024-12-20T22:25:55.000Z","dependencies_parsed_at":"2022-09-08T05:11:38.333Z","dependency_job_id":null,"html_url":"https://github.com/HallerPatrick/icecream","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ficecream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ficecream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ficecream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HallerPatrick%2Ficecream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HallerPatrick","download_url":"https://codeload.github.com/HallerPatrick/icecream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252897287,"owners_count":21821415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugger","dev-tool","development","easy"],"created_at":"2024-10-03T17:09:13.958Z","updated_at":"2025-05-07T14:40:50.960Z","avatar_url":"https://github.com/HallerPatrick.png","language":"Dart","readme":"# \u003ccenter\u003eIceCreamDart\u003c/center\u003e\n\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"icon.png\" width=\"600px\" alt=\"icecream\"\u003e\n\u003c/h1\u003e\n\n[![Build Status](https://travis-ci.org/HallerPatrick/icecream.svg?branch=master)](https://travis-ci.org/HallerPatrick/icecream)\n\n### iceream for Dart is a flavor of a good tasting debugger\n\nIt is a library inspired by the python [icecream](https://github.com/gruns/icecream) library\n\nThe purpose is to to make debugging over the console easy again.\n\nInstead of `print()` or `window.console.log()`, `ic` helps to make developing much sweeter.\n\n\n### icecream without Arguments\n\nIc comes in handy to determine which part of code is being executed and where. So if no arguments are passed to ic, it prints out the filem, line and the parent function it is being executed in.\n\n`ic()` without arguments is synchronous \n\n```dart\nimport 'package:icecream/icecream.dart' show ic;\n\nvoid foo() {\n  ic();\n}\n\nvoid main() {\n  ic();\n\n  foo();\n}\n\n```\n\nOutput:\n\n```\n🍦  example.dart:8 in main()\n🍦  example.dart:4 in foo()\n```\n\n### icecream with arguments\n\nic with arguments inspects them and return its arguments with the returning value\n\nBe aware due to some IO, `ic()` with arguments is async and therefore should be awaited to ensure the right printing order\n\n```dart\n\nimport 'package:icecream/icecream.dart' show ic;\n\nnum bar(num x, num y) {\n  return x + y;\n}\n\nvoid main() async {\n  await ic(bar(1, 2));\n}\n\n```\n\n\nOutput: \n```\n🍦  bar(1, 2): 3\n```\n\n#### Returning ic value\n\nic returns its value async while the output will still be printed out\n\n```dart\n\nimport 'package:icecream/icecream.dart' show ic;\n\nvoid main() async {\n  var output = await ic(\"Hello\");\n}\n```\n\n#### Disable ic\n\n```dart\n\nimport 'package:icecream/icecream.dart' show ic;\n\nvoid main() async {\n  await ic();\n  await ic.disable();\n  await ic();\n  await ic.enable();\n  await ic();\n}\n\n```\n\nOutput:\n\n```\n🍦  example.dart:4 in main()\n🍦  example.dart:8 in main()\n```\n\n### Custom prefix\n\n```dart\nimport 'package:icecream/icecream.dart' show ic;\n\nvoid main() async {\n  await ic.setPrefix(\"ic| \");\n  await ic(3);\n}\n```\n\nOutput:\n\n```\nic | 3: 3\n```\n\n## Installation\n\nInsert in your pubspec.yaml:\n\n```yaml\ndependencies:\n  icecream: '0.1.3'\n```\n\nIn command line:\n```\npub get\n```\n\nOr let your IDE/Editor do the work\n\n### Warning:\n\nThis library depends on the dart:mirror core library and is therefore only usable in a standalone VM of Dart.\n \n\n ### TODO:\n\n 1. Extensive testing\n 2. Proper documentation\n 3. Provide all icecream flavors with a juicy icon\n 4. Provide own configuration for flexible use of ic\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhallerpatrick%2Ficecream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhallerpatrick%2Ficecream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhallerpatrick%2Ficecream/lists"}