Android Studio: Debugging tips n' tricks (Android Dev Summit '19)

  Рет қаралды 56,814

Android Developers

4 жыл бұрын

We all spend a lot of time in the debugger, so this session teaches you about some of the powerful debugging features available in Android Studio. This talk should appeal to all, from beginners to experts and everybody in between.
01:23 - Log filtering / folding
05:13 - Conditional breakpoints
06:17 - Dependent breakpoints
07:16 - Suspend thread
09:07 - Evaluate and log
10:42 - Breakpoint groups
11:28 - Drop frame
12:34 - Mark object
14:10 - Evaluate expression
15:10 - Apply changes
17:23 - Analyze stacktrace
Here are some of the tips that we didn't have time to cover:
* Dragging a breakpoint brings its settings along with it
* Ctrl+drag makes a copy of a breakpoint
* You can set breakpoints on the closing brace of a function
* You can set breakpoints on fields / properties (called "field watchpoints")
* You can set a breakpoint on an interface method to break on all its implementations
* APK debugging → goo.gle/2BOk5mb
* Data views to control how data is displayed in the debugger → goo.gle/2MSyKmC
* How to use and understand the Overhead tab → goo.gle/32Ua8Q3
See also:
* Android Studio - Debug Your App → goo.gle/31RipD5
* IntelliJ IDEA Debugging Code → goo.gle/2NnbA79
* "Android Studio: Tips n' Tricks" from I/O '19 → goo.gle/3630bBZ
Presented by: David Herman, Justin Nieto
Android Studio Sessions → goo.gle/AndroidStudio
Android Dev Summit '19 all sessions playlist → goo.gle/ADS19allsessions
Subscribe to the Android Developers channel! → goo.gle/AndroidDevs
Check out the photo album → goo.gle/ADS19Photos
#AndroidDevSummit event: Android Dev Summit 2019; re_ty: Publish; product: Android - General; fullname: David Herman, Justin Nieto;

Пікірлер: 37
@phriend2spin
@phriend2spin 4 жыл бұрын
“Click this icon over here”...camera doesn’t show it.
@padmitrii
@padmitrii 4 жыл бұрын
Attach Debugger button which is next to Run and Debug buttons
@DazzaOnGoogle
@DazzaOnGoogle 4 жыл бұрын
Excellent. So many ways to reduce the noise of the debugger that I didn't know existed.
@ergindoganyildiz
@ergindoganyildiz 4 жыл бұрын
This is amazing, didn't know most of those!
@FootbagGuy
@FootbagGuy 4 жыл бұрын
I've been using Android Studio for ages, and I didn't know half the tips here. And now I do! Super useful!
@ralphGabbbbbb
@ralphGabbbbbb 4 жыл бұрын
Me too, kudos for that filter option on logging.
@Sleepillow
@Sleepillow 4 жыл бұрын
Me applauding to the screen
@gokulakrishnan3090
@gokulakrishnan3090 2 жыл бұрын
Thanks a lot. I have been using evaluate expression before, and that is one of the coolest tool. I learnt a lot, can't wait to use them for my next debugging session.
@selandeemantha4933
@selandeemantha4933 3 жыл бұрын
This is amazing, I haven’t known most of those. Thank you ☺️
@yalfdev
@yalfdev 4 жыл бұрын
Fantastic tips, thanks guys!
@perfecthomedecor
@perfecthomedecor 3 жыл бұрын
Amazing video, thanks for sharing such useful debugging tips
@dan.valerio
@dan.valerio 3 жыл бұрын
Very nice presentation, thank's guys!
@statwizard
@statwizard 3 жыл бұрын
Thank you very much, well done!
@imopriday2829
@imopriday2829 4 жыл бұрын
Whata super improvement! Now I like the android studio more than just crying to the bugs lol
@user-hl3br5qi6f
@user-hl3br5qi6f 2 ай бұрын
it's really cool tips. Thank you!
@LiranBarsisa
@LiranBarsisa 4 жыл бұрын
1:08 This game should be the easter egg on Android 11 ! 11:53 About drop frame, could be nice that instead of going to what called the function, we could drag the current execution line to anywhere in the code (or at least in the current function). I think it was possible on Java for PC, no? They also talk about "time machine". Could be nice to have a debug-only function (in both code and in the IDE) that saves the current state, so that we could re-reach it. 16:50 An even more efficient solution to reach a "heavy" breakpoint would be to run the app normally, and make it switch to debug on the breakpoint, using `Debug.waitForDebugger()` .
@sabinshrestha8176
@sabinshrestha8176 4 жыл бұрын
Thank you so much.
@adamyong6766
@adamyong6766 4 жыл бұрын
Very useful tips tks
@eugene_37069
@eugene_37069 4 жыл бұрын
Analyzing stacktrace is great. Also Drop frame could be very useful when applying changes.
@ElliotMitchellR
@ElliotMitchellR 4 жыл бұрын
Would love to see the open-source here!
@VanillaThunderJr
@VanillaThunderJr 4 жыл бұрын
Not seeing any extra links in the description
@harshbarnwal1879
@harshbarnwal1879 4 жыл бұрын
We want loh data of getters in Android Studio, only adding this feature will improve the debugger very much
@jaromor8808
@jaromor8808 4 жыл бұрын
Can you just keep the view of the IDE the presenter is working with? We don't need to see the room. Meanwhile we are missing parts where he points to a button and we have to guess which button he was referring to...
@noorulmubeen4974
@noorulmubeen4974 2 жыл бұрын
any help regarding the NDK code debugging working together with java code?
@AndroidDevelopers
@AndroidDevelopers 2 жыл бұрын
Check out the guide here: developer.android.com/studio/debug. Android Studio runs both debuggers at once in dual mode. You'll want to make sure that you've disabled compiler optimizations on your C/C++ code to improve the way the debugger works..
@noorulmubeen4974
@noorulmubeen4974 2 жыл бұрын
@@AndroidDevelopers have tried it it just let me know if there is a crash otherwise it didnot stop on any breakpoint i added
@kolenyov
@kolenyov 4 жыл бұрын
Guys, could you please open source this game?)
@hilmanshini_jigoku
@hilmanshini_jigoku 4 жыл бұрын
@@davidhermanyt hey man, nice presentation!
@xpopcornx1747
@xpopcornx1747 4 жыл бұрын
Stupid to not film the ide at all times, some things were not shown because they film the guy talking.
@unlokia
@unlokia 2 жыл бұрын
Google pay the audience to applaud and “Wooooooo!!!” at the end of every sentence. The more you cheer the more $$$ and useless Alphabet swag they Chuck at ya
@michelbruns
@michelbruns 3 жыл бұрын
intellij is so horrible, would love to use visual studio
@divakarhosamani4798
@divakarhosamani4798 Жыл бұрын
This is too complicated it should've been like lkg std.
@deepgee9214
@deepgee9214 4 жыл бұрын
All I have to say is AS sucks Worst IDE, thanks to intelliJ for making android coding and testing easier
@koczmen22
@koczmen22 4 жыл бұрын
IntelliJ and Android Studio are almost the same thing. What's so bad about AS?
@michelbruns
@michelbruns 3 жыл бұрын
they are basically the same, both garbage compared to vs