jlibman / lab-debugger

Code for lab: Debugger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lab-debugger

This repository contains code examples to use in learning Android Studio's Debugger tool.

If you haven’t already, you should Fork and Clone this repo in order to complete the tutorial.

How to start the project

  1. Start Android Studio and select Open an existing Android Studio project.

  2. Navigate to the folder for lab-debugger, select that folder file, and click OK.

The Calculator project builds. open the project view if it is not already open.

How to use the Debugger

In this task you'll get an introduction to the debugger in Android Studio, and learn how to run your app in debug mode.

  1. Start and Run your app in debug mode: Run > Debug app or click the Debug icon in the toolbar.

  2. Open the MainActivity.java file and set a breakpoint by clicking in the left gutter of the editor window at the line. A red dot appears at that line, indicating a breakpoint.

  3. In the Calculator app on a device, enter a number and click one of the buttons. The execution of your app stops wen it reaches the breakpoint you set, and the debugger shows the current state of your app at that breakpoint.

  4. Resume your app's execution with Run > Resume Program or click the Resume icon on the left side of the debugger window.

What to do

The app contains 5 errors that you will need to find and fix using the Debugger.

When you are done finding and fixing the errors, commit your changes and push them back up to your forked repository (the origin) using the command:

git push origin

About

Code for lab: Debugger


Languages

Language:Java 100.0%