While in debug mode , Android Studio pauses at any breakpoint that you have set . This is , as long as a breakpoint has been set on a reachable line of code ( a line of code that would be executed by system ) , Android Studio halts execution at that line until you tell it to continue.
When Android Studio hits , and pauses at , a breakpoint , the circle in the margin next to the corresponding line of code changes to circle with a check mark.
Once a breakpoint has been hit , the debug window opens at the bottom Android Studio , as show in Figure . The debug window contains many of the tools you use to navigate around your code.
Notice the navigation buttons located in the menu bar of the debug window . The most commonly used are Step Over and Step Into . Step Over advances you to the line of code that immediately follows the one at which you are currently paused . This means that if you are paused at a method call , and you press Step Over , Android Studio executes the method call without pausing and then pauses again when execution reached the next line. However , when if an exception happens in that method call and execution never reach the next line of code ? For these situations use Step Into.
Step Into follows execution wherever it leads in the code . Therefore , if you are paused at method call and click Step Into , Android Studio will shift the view to the method call and pause execution at the first line of code within that method. This allows you to then follow the execution of that method line-by-line before it returns to the calling block.
When Android Studio hits , and pauses at , a breakpoint , the circle in the margin next to the corresponding line of code changes to circle with a check mark.
Once a breakpoint has been hit , the debug window opens at the bottom Android Studio , as show in Figure . The debug window contains many of the tools you use to navigate around your code.
Notice the navigation buttons located in the menu bar of the debug window . The most commonly used are Step Over and Step Into . Step Over advances you to the line of code that immediately follows the one at which you are currently paused . This means that if you are paused at a method call , and you press Step Over , Android Studio executes the method call without pausing and then pauses again when execution reached the next line. However , when if an exception happens in that method call and execution never reach the next line of code ? For these situations use Step Into.
Step Into follows execution wherever it leads in the code . Therefore , if you are paused at method call and click Step Into , Android Studio will shift the view to the method call and pause execution at the first line of code within that method. This allows you to then follow the execution of that method line-by-line before it returns to the calling block.
Comments
Post a Comment