

So in this tutorial, we will try to understand what is the best approach to debug the code. Most of the developer they used the debugger and put the debug point to understand that we reached till the code without any issue and if not then they can be fined the cause of the error that what is going wrong with this. We are trying to understand how can we debug our code in the best way without putting any logs. You can set multiple colors for different -different sections and parts to better understand and good to show on console UI.īut again my tutorial is not about to use the Timber. It is the best-optimized library on top of an android log to read the logs data on Android Console. Timber is developed by Jake Wharton and the best part of this library is that it can provide an option that log can work in debug mode and will be ignored in the production environment. In that case, I would say please use Timber library for the log. So removing the Logs is very difficult throughout the project. We do not want to see the log in the production of an app.


Generally most of the time we have faced the problem in debug mode to production mode. But the problem is every line putting log is very obvious and not make our code modular. Somehow we got to understand that what is wrong in the code to execute our logic. For example, we are putting similar kind of logs as below. In our mind always thinks that why this is happening? So for understanding the code execution generally we are the putting the logs in each of statement of code to make sure that we reached to code as per our logic. As an android developer beginner, we stuck in our code and surprise with code execution.
