Debug without Log in Android App Code
Published in
3 min readFeb 18, 2019
Have you ever add Log.d(TAG, message)
to your Android app code just TEMPORARILY just to know a function has been reached? Or to watch a variable’s value, or count how many times a function has been reached?
After doing, then have to remove them and recompile everything again.
There’s 3 tricks below that could help you avoid need to code Log and compile and also no need to wait the breakpoint to stop.
1. “Breakpoint hit” message
Do the below if you just want to see that a function has been reached
- Right click on the breakpoint of where you want to have that print out.
- Then uncheck the Suspend so that the break point doesn’t get stop when it is reached.
- Once the Suspend is unchecked, more options will appear below. Just checked the “breakpoint hit” message. That’s it!