Debug Android Project like a PRO applying breakpoints♦️🔴

 


Debugging Android App has been always been a nightmare a newbies. As a beginner, we always run behind writing the code, developing the logic, being a fresher this is really good but once we start working in organisation, we come across various projects/use-cases which looks ambiguous to understand, here debugging comes into picture. If you came across this situation, this article if especially articulated for you.


In this article, I’ll walk you through debugging a code snippet in Android Studio using the Eclipse keymap. Let’s get started!”

[Step 1: Creating an Empty Project] First, Let’s create a default Empty Project in Android Studio, which is built using Jetpack Compose.

[Step 2: Configuring Eclipse Keymap] I’m targeting developers who use Eclipse keymap, which is available by default on Windows machines and can also be configured on Mac. So, let’s first set up Eclipse keymap in Android Studio. (Demonstration of configuring Eclipse keymap settings in Android Studio.)

[Step 3: Running the Project in Debug Mode] Now, let’s run the project in debug mode and explore how to navigate using shortcut keys.

  • “I’ll use F8 (with the function key) to navigate breakpoints one by one.”
  • “I’ll use F6 (with the function key) to step through the code line by line within a method.”

[Step 4: Evaluating Expressions] To check the current value stored in a variable, I select a specific part of the code and press Ctrl + U to evaluate the expression. Alternatively, you can right-click and choose the same option from the menu. (Demonstration of evaluating expressions and checking variable values.)

And that’s it! Now you know how to configure Eclipse keymap and use essential debugging shortcuts in Android Studio. I hope this helps! Don’t forget to like, share, and subscribe. See you in the next one!


Comments

Popular posts from this blog

Optimize Jetpack Compose: Performance & Best Practices

JIT vs AOT Compilation | Android Runtime

From ‘Master’ to ‘Main’: The Meaning Behind Git’s Naming Shift