Android-Debug debugging

There are two ways to debug: the
first one is to break the code line on the left, and then click the button similar to the beetle on the top toolbar

Click the Debug button, the one on the far right of the figure, the shortcut key (shift+F9)

Insert picture description here
The current value of var will appear at the bottom, press F8 to execute the next statement, and then find an error.
Insert picture description here
The second way is to click the Attach Debugger to Android Process button
Insert picture description here
. The difference between this way and the first way is that the second way needs to run the project first, and then Click the Attach Debugger to Android Process button to enter the debug mode

Comparison of the two methods: the
first method is to start the program in the debugging mode, and there will be a slight freeze.
The second method is to run the program by itself, and the debugging mode can be started at any time, so it is more flexible and convenient

Guess you like

Origin blog.csdn.net/News53231323/article/details/113808113