About debugging Debugging is the process of finding and fixing errors (bugs) or unexpected behavior in your code. All code has bugs, from incorrect behavior in your app, to behavior that excessively consumes memory or network resources, to actual app freezing or crashing. Bugs can result for many reasons: Errors in your design or implementation. Android framework limitations (or bugs). Missing requirements or assumptions for how the app should work. Device limitations (or bugs) Use the debugging, testing, and profiling capabilities in Android Studio to help you reproduce, find, and resolve all of these problems. Those capabilities include: The Android monitor (logcat) The Android Studio debugger Testing frameworks such as JUnit or Espresso Dalvik Debug Monitor Server (DDMS), to track resource usage In this chapter you'll learn how to debug your app with the Android Studio debugger, set and view breakpoints, step through your code, and examine variables. ...