• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# DFX Development
2
3## How do I locate the fault when the application crashes?
4
5Applicable to: OpenHarmony SDK 3.2.5.5
6
71. Locate the crash-related code based on the service log.
8
92. View the error information in the crash file, which is located at **/data/log/faultlog/faultlogger/**.
10
11## Why cannot access controls in the UiTest test framework?
12
13Applicable to: OpenHarmony SDK 3.2.5.5
14
15Check whether **persist.ace.testmode.enabled** is turned on.
16
17Run **hdc\_std shell param get persist.ace.testmode.enabled**.
18
19If the value is **0**, run the **hdc\_std shell param set persist.ace.testmode.enabled 1** to enable the test mode.
20
21
22## Why is private displayed in logs when the format parameter type of HiLog in C++ code is %d or %s?
23
24When format parameters such as **%d** and **%s** are directly used, the standard system uses **private** to replace the actual data for printing by default to prevent data leakage. To print the actual data, replace **%d** with **%{public}d** or replace **%s** with **%{public}s**.
25
26## What should I do if the hilog.debug log cannot be printed?
27
28Applicable to: OpenHarmony SDK 3.2.5.5, stage model of API version 9
29
30Run **hdc_std shell hilog -b D** to turn on the debugging switch.
31
32## Is HiLog or console recommended for log printing? How do I set the domain if HiLog is used?
33
34Applicable to: OpenHarmony SDK 3.2.2.5
35
36You are advised to use the [HiLog](../reference/apis/js-apis-hilog.md) for log printing. For details about how to set the **domain** parameter, see the [Development Guide](../reference/apis/js-apis-hilog.md#hilogisloggable).
37
38## What is the maximum length of a log record when HiLog is used? Is it configurable?
39
40Applicable to: OpenHarmony SDK 3.2.2.5
41
42The maximum length of a log record is 1,024 characters, and it is not changeable.
43
44## Can I separate multiple strings by spaces in the tag parameter of the HiLog API?
45
46Applicable to: OpenHarmony SDK 3.2.6.5, stage model of API version 9
47
48No. Separating multiple strings by spaces is not allowed.
49
50## How do I print real data if HiLog does not contain data labeled by {public}?
51
52Applicable to: OpenHarmony SDK 3.2.6.5, stage model of API version 9
53
54Run **hdc\_std shell hilog -p off** to disable logging of data labeled by {public}.
55