Hbuilder Android Real-machine debugging about debugging
A person who is difficult will not be difficult. For debugging, this sentence is particularly appropriate. Whether it is front-end debugging, Java Debugging, PHP debugging, Python debugging, or we want to study the Hbuilder Android real Machine debugging, is a truth. Haste makes waste, ax. Take the time to grind a grind to debug the knife.
Environment preparation
1, install the Hbuilder.
2. Install Chrome.
3, computer installation Good 360 mobile phone assistant.
4, Android phone and cable.
Start Debug mode
Take Meizu pro6s and glory 6 as an example.
Meizu pro6s
1, settings, about the mobile phone, in the "version number" of the project column, a continuous click 7 times, you will be prompted to open the developer options.
2, back to the settings interface, accessibility, click to see the "Developer Options", enter the "developer Options" can open "USB debugging".
3, in the developer options interface, pull down to the end, performance optimization, advanced log output, select all Allow.
At this point, Meizu pro6s Debug mode started successfully. However, when debugging, the applet can start the app, but cannot use Console.log ().
On the Dial page, enter *#*#3646633#*#* , enter engineering mode, slide-slip to log and debugging,debug Utils, debug level to engineer mode. However, it is of little use.
Back up HBuilder\tools\adbs the Adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll, and then copy HBuilder\tools\adbs\1.0.31 all the files in the folder and paste them into the HBuilder\tools\adbs directory. However, it is of no use.
Well, my Meizu pro6s has a pit and then discards ...
Glory 6
1, settings, about the mobile phone, in the "version number" of the project column, a continuous click 7 times, will be prompted to enter the developer mode;
2. Go back to the setup screen and drop down to see the developer options.
3. Click the Developer Options screen and click the slider behind the developer options to open developer mode.
4, the developer options interface, the drop-down to open "USB debugging."
Optional operation:
1. In the Dial-up page, enter *#*#2846579#*#* and enter the Project menu.
2, background settings, log settings, click to check the required log.
Commissioning Process
1, the mobile phone connected to the computer.
2, start 360 mobile phone assistant, connect the phone, and then start the 360 demo.
3. Start the Hbuilder,ctrl+r and run the application on the phone.
4. Start Chrome, enter in the Address bar chrome://inspect , and open the Device check page.
file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/.HBuilder/apps/HBuilder/www/pages/center/…Represents the location of the file in the Android phone.
5, click "Inspect", you can open the debugging of this page. If you start a white screen interface, it means that you want to FQ.
6, after the debugging, and front-end debugging the same.
7, style adjustment, break point, select elements in the page (in the debugger, or select in the 360 demo) ...
At this point, you can happily debug the Android real machine.
Hbuilder Android Real-Machine debug