Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Debugging: All you need to know (English Only)

Debugging: All you need to know (English Only)

My presentation at DroidKaigi 2024 ref: https://2024.droidkaigi.jp/timetable/694440/

For Android developer from beginner to intermediate level

The session abstraction is the following.

Debugging is mandatory for you to identify debugs, to support customers/stakeholders, to improve the development productivity and so on. And also, modern team development expects some debugging skills for individuals. However, standard team development processes like code-reviews and design documents would not approach to debug skill improvements.

In this way, debugging skills are mandatory for your teams but also need to learn them alone. This could be an obstacle for both beginners and experts. In particular, experts may lose opportunities to investigate/learn better debugging approaches if problems can be solved by classical ways that are familiar with them.

I will talk about debugging skills/techniques by using Android Studio (IDEA)'s built-in debugger, debug options, etc. Conditional breakpoints and coroutine debugging will be covered. You can learn them through sample codes shown in Android app development like Jetpack Compose stuff.

Keywords: Print debugging, debugger, coroutine debugging, breakpoints

Matsuda Jumpei

September 10, 2024
Tweet

More Decks by Matsuda Jumpei

Other Decks in Programming

Transcript

  1. 2 Jumpei Matsuda @red_fat_daruma Software Architect at DeployGate, Inc. Android

    App and SDK Development Gradle Plugin Development Development Productivity Engineering Rails App Development and more... .F https://deploygate.com
  2. w ✅+7.%FCVHHFSXJUI"OESPJE4UVEJP w ✅0 ffi DJBMEFCVHPQUJPOT w ❌"OESPJE/%, ,PUMJO/BUJWF w

    ❌SEQBSUZEFCVHMJCSBSJFTUPPMT w ❌%ZOBNJDQSPHSBNBOBMZTJT BTQFDUPSJFOUFEQSPHSBNNJOH $PWFSBHFPGUIJTQSFTFOUBUJPO 3
  3. w *T%FCVHHJOHPOMZGPS fi YJOHCVHT  w /P  EFCVHHJOH JTNPSFHFOFSJD

    w 'PSFYBNQMF XFPGUFOEFCVHBOBQQFWFOXIJMFBEEJOHBOFXGFBUVSF w %FCVHHJOHJTSFRVJSFEJGBOFXDPEFEPFTOUXPSLBTFYQFDUFE w &OHJOFFSTCBTJDBMMZEFCVHUIFJSQSPEVDUDPEFFWFSZEBZ w 6OMFTTUIFZBSFGBVMUMFT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