Version: 1.3
语言 : 中文
OpenHarmony Hilog
Hilog

Getting started with the OpenHarmony Hilog package

This section of the documentation explains how to install and set up the OpenHarmony Hilog package so that you can use it to get logs, restore the stack, capture memory, and obtain ArkUI dump on an OpenHarmony device.

Install the OpenHarmony Hilog package

To add the OpenHarmony Hilog package to your project, use the Tuanjie Package Manager. For information on how to add the OpenHarmony Hilog package, see Adding and removing packages.

The package name is com.tuanjie.openharmony-hilog and the display name is OpenHarmony Hilog.

After completing the installation, you can access this window in Tuanjie Editor. To open the Hilog window in the Tuanjie Editor:

  • Menu: Window > Analysis > OpenHarmony Hilog.
  • Shortcut: Alt+7 (macOS: Option+7).

If this menu does not appear, please ensure that the OpenHarmony platform is loaded.

Connect to an OpenHarmony device

The OpenHarmony Hilog package supports wired and wireless connection. This page explains how to connect an OpenHarmony device to the OpenHarmony Hilog window.

Wired connection (Recommended)

You can use a data cable to connect the OpenHarmony device and Tuanjie Editor. Please make sure that the USB debugging switch is turned on your device.

When you open the OpenHarmony Hilog window, Tuanjie automatically adds any wired-connected OpenHarmony device to the device list.

  • If the connection is successful, the green word “Connected” will be displayed in the lower left corner of the window.

    Connected reminder
    Connected reminder
  • If the connection is unsuccessful, the red word “Disconnected” will be displayed in the lower left corner of the window. Please check your device and data cable again.

    Disconnected reminder
    Disconnected reminder

Wireless connection

The OpenHarmony deivce and PC with Tuanjie Editor have been connected to the same WLAN network. To connect an OpenHarmony device to the OpenHarmony Hilog window:

  1. Make sure the device and Tuanjie Editor are connected to the same WLAN network.

  2. Open the OpenHarmony Hilog window.

  3. From the toolbar, select the Device Selector.

  4. Select Other connection options.

  5. In window that opens, if OpenHarmony device has already been connected with Tuanjie editor by USB, click Connect near Copy IP, this window will check WLAN mode and connect to IP automatically.

  6. If no responses or timeout, please enter the device’s IP address manually and select Connect.

    Other connection options
    Other connection options

Note: The IP address of the OpenHarmony deivce has been obtained, which can be viewed through Settings > About Phone/About Tablet > Status Information > IP Address. The 5555 port on the Phone/Tablet is open. If it is closed by default, You can connect the device via USB and execute the following command to open it.

 hdc tmode port 5555

Select or switch a device

You can only connect to one device at a time. To select which device to connect to, use the device list in the OpenHarmony Hilog window. This list contains the device IDs of connnected devices.

Connected list
Connected list
OpenHarmony Hilog
Hilog