DEV Community

Cover image for HarmonyOS Development: How to wirelessly debug applications
程序员一鸣
程序员一鸣

Posted on

HarmonyOS Development: How to wirelessly debug applications

Foreword

this article API>= 13, based on DevEco Studio 5.1.0 Release, version number 5.1.0.828

debugging applications, in general, we will use our own simulator for running and debugging. However, in the case of so Library, the simulator architecture often does not match, which makes the application unable to be installed. We have to use a real machine for testing and use a real machine. I believe most developers use data line connection. In Hongmeng development, in addition to debugging applications in this way, we can also debug applications wirelessly.

Wireless debugging process

to use wireless, there is a prerequisite, that is, your computer equipment and real machine equipment must be under the same WLAN network, otherwise, it cannot be operated. This 1.1 must be guaranteed before the following actions can be continued.

Turn on wireless debugging

after confirming that the two devices are under the same network, open the real machine, find the setting button, find the developer option, and turn on the wireless debugging switch.

Image description

After it is turned on, there will be the IP address and port number of the current device. This is the condition of the connection and must be remembered.

Image description

Connecting devices

currently, there are two ways to connect devices. One is to configure devices through DevEco Studio. In the DevEco Studio menu bar, find the Tools menu and find the IP Connection option.

Image description

After opening, it is the following page. After entering the IP address and port number to be remembered above, click the Run button on the right.

Image description

After the connection is successful, you can see this device in the device list. If you run it directly, you can run the project. It should be noted that the real machine Debugging application must be signed.

Image description

In addition to the above use of it, we can also run the application wirelessly through the hdc command.

Execute the command as follows:

hdc tconn Device IP address:Port number
Enter fullscreen mode Exit fullscreen mode

related Summary

the above is how to use wireless to debug applications in Hongmeng's development. It is relatively simple. There is only one thing to pay attention to, that is, two devices, one is a PC computer and the other is a real machine device, all need to be under the same network to run and apply.

This article label: Hongmeng Development Tools/DevEco Studio

Top comments (0)