Drop frame is dangerous, so don't rely on it unless absolutely necessary. What it resets is the function state and moves back the instructions. However, by then if any instructions are happened, like start a thread, the thread will still continue and not be stopped abruptly because you dropped a frame. If one of the instructions adds a value to a list (outside of function, eg., class member) then that value won't be removed back.
For what it's worth, you're not wrong, but this is why it's important to abide by things like separation of concerns and the principle of least knowledge. If your functions and methods are short and specific with very few side effects, you can use Drop Frame with impunity most of the time. I use it a lot, because I often work on very large apps with complicated workflows that would require a lot of setup if I needed to get back to a certain state.
You missed a few points. Yes you can setup breakpoints with right click. But in case you want the program execution stop for a special condition, you can right click on existing breakpoint and type in condition. That way in case when breakpoint is, say, within a loop - you won't have to click over to reach expected condition and the program will stop only when that condition is met. Also you didn't mention execute code button - very handy. Basically you can execute some additional code in runtime, when reaching a breakpoint that is locally available in current breakpoint step
I cannot figure this out... I have a breakpoint on a Toast message that displays every time the code launches... Put additional breakpoints; on, before, and after. JUST to make sure I didn't do somethin stupid clicking wrong thing. I'm launching code using the debugger icon (not the run icon) just as in your tutorial. I see the debugger panel running at bottom of SDK. Then the Toast message displays but the breakpoint doesn't trip??? Is there a bug in the SDK? I'm super confused, I've used all kinds of debuggers but I have no clue what's going on here. For more details, I'm using the emulator not a external device / not USB debugging. Last note, I can click pause in the debugger panel then step to next line and it works... but it won't trip any breakpoints if I put them in the code. No clue.? There must be a bug no? Any idea how to submit a bug to Google? UPDATE: There seems to be an issue with the build files. I created a new project and debugger works. However, on this other project, I cannot figure out how to do a clean rebuild. In other SDK's that was pretty clear but here I don't know how to delete intermediate files and create a fresh build?
Great video! Do you think that debugging asynchronous code could be its own video? I often run into an issue where I'm stepping through a suspend function, and the debugger just. . .runs off on its own, seemingly ignoring breakpoints. I know that this is due to the tricky nature of async, but it seems odd that I can't find any good info on configuring teh debugger to deal with async, especially given the IDE already highlights async calls with a special icon in the gutter. Some tips and tricks for debugging async kotlin would go a long way!
Yeah it's tricky. I often actually prefer logs when debugging async stuff since with the timestamps you can better see what gets executed in which order. But very dependent on the situation
New to android studing this video was super helpful. Can anyone kindly advise say I have an API in visual studio and my Android app in Android Studio how can I step into my visual code to debug the API when my Android app hits say a button click ?
That is really helpful guide thanks. Also there is some kind of useful trick on Watches panel that you can manipulate data without rebuilding entire project for example you can change variable of array or swap's current value or something like that and the following code will be go with your manipulated variable.
Is there any chance to debugged a pre-built apks in android studio? If yes, this would be a great to learn. I have an app having an issue if installed on my device as pre-built. But it's working if I installed it directly from Android Studio. Hope you can help me
you missed the most important part that evaluate expressions you can use this icon for, such as you make request to a server and you have different any types of data and your request does not response success in this case you should check which data cause a problem in that poin you should comp related thing to EVALUATE EXPRESSION window and check what is the problem and what is the cause of the problem ;
Hey I have watched all your videos and recommend your channel to my colleague as well. This is superb what u are doing here. Can you give some idea regarding how to create a custom swipe refresh with lottie animations. Thanks in advance.
I am waiting for the videos day after day, can you explain the paginator, which you presented in a previous video, with the concept of Resources and Flow that you use in your projects
@@PhilippLackner I assumed that in this video there would be some complex techniques that I had not encountered before. But in fact, all this is familiar. Thanks for this video. (sorry for my language, I'm from Ukraine)
Drop frame is dangerous, so don't rely on it unless absolutely necessary. What it resets is the function state and moves back the instructions. However, by then if any instructions are happened, like start a thread, the thread will still continue and not be stopped abruptly because you dropped a frame. If one of the instructions adds a value to a list (outside of function, eg., class member) then that value won't be removed back.
Is it safe to say the drop frame destory the current stack but won't change the heap?
@@wizardy6267 Yes, exactly
For what it's worth, you're not wrong, but this is why it's important to abide by things like separation of concerns and the principle of least knowledge.
If your functions and methods are short and specific with very few side effects, you can use Drop Frame with impunity most of the time.
I use it a lot, because I often work on very large apps with complicated workflows that would require a lot of setup if I needed to get back to a certain state.
This is such an underrated channel, i really enjoy your content 👌
You missed a few points. Yes you can setup breakpoints with right click. But in case you want the program execution stop for a special condition, you can right click on existing breakpoint and type in condition. That way in case when breakpoint is, say, within a loop - you won't have to click over to reach expected condition and the program will stop only when that condition is met. Also you didn't mention execute code button - very handy. Basically you can execute some additional code in runtime, when reaching a breakpoint that is locally available in current breakpoint step
Thanks for the information.
I hate you so much for not showing me this earlier ... :D
Thank you for the tips, they are really helpful.
Thanks for this great content. Finally the debugger tool doesn't look like a matrix terminal to me
Glad it helped
didn't knew most of these..thank you
Your channel should be named
Android developers charger 😂❤️❤️❤️❤️🇪🇬🇪🇬
We need paging 3 tutorial plz ? ❤️
Video is quite useful for beginners. But there were some points that were not shown, like adding expressions to variables, conditional breakpoints.
which is your theme that you using in this video? is beatiful!
I cannot figure this out... I have a breakpoint on a Toast message that displays every time the code launches... Put additional breakpoints; on, before, and after. JUST to make sure I didn't do somethin stupid clicking wrong thing. I'm launching code using the debugger icon (not the run icon) just as in your tutorial. I see the debugger panel running at bottom of SDK. Then the Toast message displays but the breakpoint doesn't trip??? Is there a bug in the SDK? I'm super confused, I've used all kinds of debuggers but I have no clue what's going on here. For more details, I'm using the emulator not a external device / not USB debugging. Last note, I can click pause in the debugger panel then step to next line and it works... but it won't trip any breakpoints if I put them in the code. No clue.? There must be a bug no? Any idea how to submit a bug to Google?
UPDATE: There seems to be an issue with the build files. I created a new project and debugger works. However, on this other project, I cannot figure out how to do a clean rebuild. In other SDK's that was pretty clear but here I don't know how to delete intermediate files and create a fresh build?
Great video!
Do you think that debugging asynchronous code could be its own video? I often run into an issue where I'm stepping through a suspend function, and the debugger just. . .runs off on its own, seemingly ignoring breakpoints.
I know that this is due to the tricky nature of async, but it seems odd that I can't find any good info on configuring teh debugger to deal with async, especially given the IDE already highlights async calls with a special icon in the gutter.
Some tips and tricks for debugging async kotlin would go a long way!
Yeah it's tricky. I often actually prefer logs when debugging async stuff since with the timestamps you can better see what gets executed in which order. But very dependent on the situation
I think if you open the breakpoints popup, you can select that you want to stop one thread or every thread when a breakpoint is reached.
@@chebbaelyes that's a good tip. I need to check on that when I get back to work Tuesday!
New to android studing this video was super helpful.
Can anyone kindly advise say I have an API in visual studio and my Android app in Android Studio how can I step into my visual code to debug the API when my Android app hits say a button click ?
That is really helpful guide thanks. Also there is some kind of useful trick on Watches panel that you can manipulate data without rebuilding entire project for example you can change variable of array or swap's current value or something like that and the following code will be go with your manipulated variable.
Is there any chance to debugged a pre-built apks in android studio? If yes, this would be a great to learn. I have an app having an issue if installed on my device as pre-built. But it's working if I installed it directly from Android Studio. Hope you can help me
I didn't know about the watches 👌👏
You can click on line numbers to move to that line
I need use watch variables more
Дякую друже, це найкраще відео про дебагер
you missed the most important part that evaluate expressions you can use this icon for, such as you make request to a server and you have different any types of data and your request does not response success in this case you should check which data cause a problem in that poin you should comp related thing to EVALUATE EXPRESSION window and check what is the problem and what is the cause of the problem ;
Great looking studio
Thanks!
Super useful, thank you!!
You are saving my career. Thanks a lot man
Glad to hear that!
Bro you saving my ass for real. I'm new to Android
Very cool video
Thank you BRO👍👍👍
Thanks for the video!
Also, how do I enable the right panel showing all the code of the editor?
Hey I have watched all your videos and recommend your channel to my colleague as well. This is superb what u are doing here.
Can you give some idea regarding how to create a custom swipe refresh with lottie animations.
Thanks in advance.
Hi Philipp Lackner, Can make a video on Profiler.
good videos now and then thanks✌️
Make also a debugging video for professionals please
very help full guid bro thanks 👍
Please do an advances shortcuts video for Android Studio :)
I am waiting for the videos day after day, can you explain the paginator,
which you presented in a previous video, with the concept of Resources and Flow that you use in your projects
Thank you a lot!!
Can you create app tutorial videos for m1 or intel release NDK
Is it possible to debug through the steps of loops?
Thanks 👍
I can't stress this enough
Philipp may not be pregnant by he never fails to deliver ❤
where can I find the debug console? plz help
open it from windows section
Why Android Studio doesnt show me in which line my app crashed automatically by default?
Phil u rock.
I hope google will make a powerful development tools for android framework just like flutter
whats up with the braw bro? ;)
Amazing
What about suspended functions or flow
works as well
@@PhilippLackner No it doesn't, as far as I experimented!
Xcode theme 😍
You have forgotten to mention how to catch an exception before it actually occurs via Java Exception Breakpoints. Still great job 👍
Not really ultimate, but 👍
What's missing in your opinion? :)
@@PhilippLackner I assumed that in this video there would be some complex techniques that I had not encountered before. But in fact, all this is familiar. Thanks for this video. (sorry for my language, I'm from Ukraine)
1K likes :)
First View :)
10th
heh, View
we use Compose now
...
bad joke? 🥲
@@itszechs nice developer's joke 🤩🥳🥳