Updated on 2026-07-29 GMT+08:00

Obtaining Logs

To ensure normal system operation, improve troubleshooting efficiency, and locate and analyze problems in a timely manner, you can obtain and view the log information of CodeArts Agent by following the instructions provided in this section.

Log Level Description

Log levels increase in severity like this: Debug, Info, Warn, and Error.

  • Debug: records detailed internal information during runtime, such as request details and process steps. This level is mainly used for debugging and fault locating in the development phase.
  • Info: records key status information during normal runtime, such as service startup and request processing summaries, to help you understand the basic system workflow.
  • Warn: records potential issues that may affect system stability, such as missing configurations and insufficient resources. These issues do not directly cause program interruption.
  • Error: records errors that have caused some functions to be abnormal or operations to fail, such as API calling failures and data parsing errors. These errors require timely attention and rectification.

Setting the Log Level

Set the log level based on the actual scenario to control the output content and details of logs, thereby improving log readability and system debugging efficiency. You are advised to set the log level to Debug. Debug logs record internal code execution details during development and debugging, making it easier to locate and troubleshoot problems that occur during code execution.

  1. Log in to CodeArts Agent IDE as instructed in Quick Start.
  2. Click in the upper right corner of CodeArts Agent IDE to open the settings page.
  3. In the navigation pane, choose Chats.
  4. In the Advanced Settings area, select Debug from the Minimum Log Level drop-down list.

Obtaining Logs

In CodeArts Agent, logs are classified into the following types. Obtain logs based on the actual requirements.

The following operations apply only to Windows and macOS.

If CodeArts Agent encounters issues such as dialog box anomalies, setting errors, task failures, garbled output, or frozen statuses, you can follow the steps below to obtain agent logs for troubleshooting.

  • Obtaining Session Logs
  1. Open CodeArts Agent IDE and choose Help > Show All Commands from the top menu bar.

    Figure 1 Choosing Show All Commands

  2. Enter log to search for the command, and select Huawei Cloud CodeArts Agent: Open Current Log File. The log content is displayed in the editor.

    Figure 2 Selecting Huawei Cloud CodeArts Agent: Open Current Log File

  3. Right-click the log name at the top of the editor and choose Reveal in File Explorer from the shortcut menu. The folder where the log is stored is displayed.

    Figure 3 Choosing Reveal in File Explorer

  4. Obtain the agent session logs of the required date.
  • Obtaining Kernel Logs

    View kernel logs in the local %USERPROFILE%/.codeartsdoer/codearts-data/log directory.

    Figure 4 Obtaining kernel logs

If the IDE encounters functional anomalies related to directory display, code editing, menu bar configurations, or login, check the IDE logs to troubleshoot and locate the issue.

  1. Open CodeArts Agent IDE and choose Help > Show All Commands from the top menu bar.

    Figure 5 Choosing Show All Commands

  2. Enter Developer to search for commands, and select Developer: Open Logs Folder.

    Figure 6 Selecting Developer: Open Logs Folder

  3. Obtain main.log.

If the IDE process exits unexpectedly or encounters an out of memory (OOM) error, you can collect the IDE crash logs to help troubleshoot the fault.

How to obtain: Navigate to the local path %USERPROFILE%/AppData/Roaming/codearts-agent/Crashpad/reports to view the IDE process exception logs.