Skip to content

Introduction

AmirHossein Abdolmotallebi edited this page Apr 28, 2023 · 2 revisions

Debug Board

This is a debug utility library which can speedup your development in Kotlin applications

TL;DR

With this library you can do this things (for now)

  1. watch your variables / states during runtime
  2. watch your network requests
  3. watch your custom logs

In a panel

  1. Web browser panel
  2. IntelliJ Idea plugin

Variable Watch

How much do you often put println(myVar) in all around your code base for a tracking variables? of course someone prefer to use breakpoints or someone prefers just simple logging but each of them have some problem and cant be used every where or maybe its too slow for to initialize debug session just a simple variable or even maybe its not possible at all

For example if you familiar with Jetpack Compose you can't just add breakpoint in composables to watch your states as this is a declarative UI library and you just declare what you want and library does the rest (breakpoints have restriction on coroutine context and also your breakpoint may hit on every recomposition) you may use log for this as I did before but what if your data is complex or a nested object ? the idea of this library is comming from here, as I am tired of println everywhere in code! with this library you can just add addWatch or AddWatch(in case of Compose) to watch your variables in a panel when your variable . the panel will updated too . so you have a live preview of your variable in the panel

Network Watch

another problem of online applications is that you may want to inspect network request and log them again with that println :D but now with this library you can watch all your request with only one line of code for a whole project! at the moment this library has support these libraries out of the box (but you can have your own integration)

  1. Ktor Client
  2. OkHttp Client (retrofit use it under the hood)

Watch Logs

an app comes with a lot of logs maybe you don't need all of them for example android Log Cat has bunch of logs like system logs etc that are not usefull for every body! so I decided to add a log feature to this library to only log that stuff I Interested on

Currently these libraries has an integration out of the box (but you can use it without any integrations)

  1. Android's Timber Library
  2. // add more integrations ?

Clone this wiki locally