Android debugging shortcuts and related skills
1. Set breakpoints
Method 1: double-click the blank column on the left of a line.
Method 2: ctrl + shift + B
The first operation is "add", and the second operation is "cancel.
Ii. Shortcut Keys for debugging
1. [Ctrl + Shift + B]: Set a breakpoint or cancel a breakpoint in the current row.
2. [F11]: debug the program that was last executed.
3. [Ctrl + F11]: run the program that was last executed.
4. [F5]: trace the method. When the program executes a method, press [F5] to track the method.
5. [F6]: One-step execution program.
6. [F7]: After the method is executed, the last statement that calls this method is returned.
7. [F8]: continue to run until the next breakpoint or program ends.
3. Stay and view variable values
Right-click a variable and choose Watch. The Expressions box is displayed to view the variable value.
Iv. Log information printer
There are five commonly used logs: Log. v () Log. d () Log. I () Log. w () Log. e ().
Corresponds to VERBOSE, DEBUG, INFO, WARN, and ERROR according to the first letter.
5. Share some debugging tips in Eclipse
Variables we watch and program breakpoints we add will not be automatically deleted by Eclipse. Unless we manually delete them, they will remain in the purple box. These values will slow down the Eclipse development tool, if there are too many bugs in Eclipse, it is likely to cause Eclipse to crash, making development very painful, we recommend that you manually clear all the program breakpoints and watched variables added in the purple box during each Debug and debugging. You only need to add the breakpoints required for this debugging, in this way, Eclipse will not be crashed by these slow processes.
References:
Http://xys289187120.blog.51cto.com/3361352/657169
Http://blog.sina.com.cn/s/blog_4b93170a0102dw6d.html