-
Notifications
You must be signed in to change notification settings - Fork 521
Debugging
We do a lot of debugging at Oppia-Android, whether because tests are failing on a PR or because of a tricky bug that was found during release testing. This guide will help you get started with debugging and offer useful tips:
Generally, finding the root cause of a bug is a question of strategically checking various things so that you can narrow down the "search space" of its possible causes. Here is an approach that you can use to get started:
- First, try to reproduce the bug. If you can, that's great; that means you have a way to check whether your fix works. Otherwise, see if you can figure out what circumstances cause the bug to appear (is it on a particular device, does it happen only on either the prod or dev build, etc.). This is important because you will need to find a way to reliably reproduce the bug, in order to test whether your fix worked.
- If this issue arose in your PR, then check whether the bug appears in develop. If so, then you know that it's not due to changes in your PR, and can do further investigation directly on develop. Otherwise, you can narrow down the cause to a change in your PR.
- Based on the environment you've identified in steps 1 + 2, write a test case which the bug causes to fail (if one doesn't already exist). This gives you an automatic way to check whether or not the bug is fixed.
- Then, work towards the solution, until the test case you wrote in step 3 passes.
Unless the bug you are trying to fix is trivial, we recommend creating a debugging doc to organize your work and easily communicate it to other team members. See Debugging Docs for guidance on how to write a debugging doc.
Have an idea for how to improve the wiki? Please help make our documentation better by following our instructions for contributing to the wiki.
Core documentation
Developing Oppia
- Contributing to Oppia Android
- Bazel
- Key Workflows
- Testing
- Developing Skills
- Frequent Errors and Solutions
- RTL Guidelines
- Working on UI
- Writing Design Docs
Developer Reference
- Code style
- Background Processing
- Dark mode
- Buf Guide
- Firebase Console Guide
- Platform Parameters & Feature Flags
- Work Manager
- Dependency Injection with Dagger
- Revert & regression policy
- Upgrading target SDK version
- Spotlight Guide
- Triaging Process
- Bazel
- Internationalization
- Terminology in Oppia
- Past Events