{"id":16773760,"url":"https://github.com/amir1376/debugboard","last_synced_at":"2025-10-16T19:52:49.356Z","repository":{"id":147204360,"uuid":"606913822","full_name":"amir1376/debugboard","owner":"amir1376","description":"Runtime debug utilities for kotlin","archived":false,"fork":false,"pushed_at":"2023-07-03T15:39:36.000Z","size":434,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T17:51:54.293Z","etag":null,"topics":["android","debugging-tool","idea-plugin","interceptor","jvm","kotlin","ktor","okhttp","variable-watcher"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amir1376.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-26T22:57:35.000Z","updated_at":"2024-12-01T06:30:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d7939c6-1bb4-4f98-8345-0ae23a631701","html_url":"https://github.com/amir1376/debugboard","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir1376%2Fdebugboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir1376%2Fdebugboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir1376%2Fdebugboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amir1376%2Fdebugboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amir1376","download_url":"https://codeload.github.com/amir1376/debugboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248287929,"owners_count":21078811,"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":["android","debugging-tool","idea-plugin","interceptor","jvm","kotlin","ktor","okhttp","variable-watcher"],"created_at":"2024-10-13T06:46:56.157Z","updated_at":"2025-10-16T19:52:49.230Z","avatar_url":"https://github.com/amir1376.png","language":"Kotlin","readme":"\n\u003cp align=\"center\" style=\"text-align:center\"\u003e\n\u003cimg width=\"75\" alt=\"logo\" src=\"static/logo.svg\"\u003e\n\u003ch1 align=\"center\" style=\"text-align:center\"\u003eDebug Board\u003c/h1\u003e\n\u003c/p\u003e\n\u003cp align=\"center\" style=\"text-align:center\"\u003e\nRuntime debug utilities for kotlin that has panel for both IDE and Web\n\u003cbr\u003e\u003cbr\u003e\n\u003ca href=\"https://jitpack.io/#amir1376/debugboard\"\u003e\n\u003cimg alt=\"Debug Board Jitpack\" src=\"https://jitpack.io/v/amir1376/debugboard.svg\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n-------\n\n## Features\n\n- Watch variables when your app is running\n- Inspect network request/response\n- Show logs\n- Has a [Plugin](https://plugins.jetbrains.com/plugin/21331-debug-board) for IntelliJ Idea / Android Studio\n- Or Directly in your browser\n\n## Setup\n\n### Dependency\n\nAdd to your gradle build script file\n\n```kotlin \n//build.gradle.kts\n\nrepositories {\n    //...\n    maven(\"https://jitpack.io\")\n}\n\ndependencies {\n    //...\n    val version = \"x.y.z\" //see the last version above\n    //core library\n    debugImplementation(\"com.github.amir1376.debugboard:core:$version\")\n    releaseImplementation(\"com.github.amir1376.debugboard:core-no-op:$version\")\n    \n    //backend (for Web Panel / IntelliJ Plugin)\n    debugImplementation(\"com.github.amir1376.debugboard:backend:$version\")\n    releaseImplementation(\"com.github.amir1376.debugboard:backend-no-op:$version\")\n    //optional integrations\n    //add one of these integrations for network inspection\n    debugImplementation(\"com.github.amir1376.debugboard:ktor:$version\")\n    releaseImplementation(\"com.github.amir1376.debugboard:ktor-no-op:$version\")\n    debugImplementation(\"com.github.amir1376.debugboard:okhttp:$version\")\n    releaseImplementation(\"com.github.amir1376.debugboard:okhttp-no-op:$version\")\n    // integration for android timber library\n    debugImplementation(\"com.github.amir1376.debugboard:timber:$version\")\n    releaseImplementation(\"com.github.amir1376.debugboard:timber-no-op:$version\")\n    // integration for jetpack compose library \n    debugImplementation(\"com.github.amir1376.debugboard:compose:$version\")\n    releaseImplementation(\"com.github.amir1376.debugboard:compose-no-op:$version\")\n}\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eWhat is that no-op postfix after module names?\u003c/summary\u003e\nIt is the \"No Operation\" version of that module. It removes all functionalities that DebugBoard uses during development \nwhich reduces release output size\nYou can use it in your release variants\n\u003c/details\u003e\n\n## Usage\n\nStart embedded Web Server to access the (Web/Plugin) Panel\n\n```kotlin\nDebugBoardBackend().startWithDefaultServer()\n```\n\n\u003e Server listens on port 8000 by default\n\n\u003e If you are using plugin use `ws://` instead of `http://` in address box for access the panel\n\n\u003e Server address will be logged in `STDOUT` too\n\n\u003cdetails\u003e\n\u003csummary\u003eNote for android users\u003c/summary\u003e\n\nMake sure you have declared `Internet permission` in your application's `AndroidManifest.xml`\n\n```xml\n\n\u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\n```\n\notherwise android does not allow you to create server\n\n\u003c/details\u003e\n\n### Watch a variable\n\n![Watcher in panel](static/watcher_panel.png)\n\nTo watch a variable you have to passed it into addWatch\n\nyour variable must be an observable or somehow notify library about its update\nhere I use a StateFlow\n\n```kotlin\nval stateFlow = MutableStateFlow(\"bla bla\")\nval removeWatch = addWatch(\"specifyName\", stateFlow) \n```\n\nNow when `stateFlow` changes you will be notified in Web Panel\n\n```kotlin\nstateFlow.value = \"ha ha\"  \n```\n\nAnd after you don't want to watch this anymore\ncall returned function from the addWatch() to remove from watchlist\n\n```kotlin\nremoveWatch()\n```\n\n### Network inspection\n\n![Network Panel](/static/network_panel.png)\n\nAdd one of network library integrations to your project dependencies\n\n- #### [Ktor client](https://github.com/ktorio/ktor)\n\n```kotlin\nHttpClient {\n    //...\n    install(KtorDebugBoard)\n}\n```\n\n- #### [Okhttp client](https://github.com/square/okhttp)\n\n```kotlin\nOkHttpClient\n    .Builder()\n    //...\n    .addInterceptor(OkHttpDebugBoardInterceptor())\n    .build()\n```\n\nNow all your request and response will be available in the Web Panel\n\n### Log\n\nYou can send some logs to the log panel here is an example\n\n```kotlin\nDebugBoard.Default.logger.log(\n    LogData(\n        LogLevel.Debug,\n        \"TAG\",\n        \"my message\"\n    )\n)\n```\n\n#### Jetpack Compose\n\nYou can use AddWatch composable function\nto watch a variable inside a composition scope\nit will be automatically removed after Composable exits from the screen\n\n```kotlin\n@Composable\nfun MyPage() {\n    val myUiState = rememberSomeUiState()\n    AddWatch(\"MyPageState\", myUiState)\n}\n```\n\n#### Timber\n\nIf you use [timber library](https://github.com/JakeWharton/timber) you can plant `DebugBoardTree` to add your log data\ninto the Web Panel\nin your Application class initial `timber` with\n\n```kotlin\nTimber.plant(\n    DebugBoardTree(),\n    Timber.DebugTree()\n)\n```\n\n## Todos\n\n1. [X] Add jetpack compose integration and utilities\n2. [X] Improve ktor plugin to handle errors\n3. [X] Add some screenshots from the Web Panel\n4. [X] Improve log and add filter in Web Panel\n5. [X] Add Intellij Idea Plugin\n5. [X] Add \"No Operation\" version of each module\n6. [ ] Add database into panel\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir1376%2Fdebugboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famir1376%2Fdebugboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famir1376%2Fdebugboard/lists"}