目录

Capturing Screenshots

During the debugging process, you can capture screenshots in various ways.

Using DevEco Studio

  1. Connect to a real device or the Emulator, and run an app on the device or Emulator.
  2. On DevEco Studio, open the Log tab page.
  3. Click on the toolbar on the left to capture a screenshot.

    The screenshot is displayed in DevEco Studio.

  4. (Optional) Right-click the image display area and choose Copy Path/Reference from the shortcut menu to view the local path of the screenshot or display the local path below the menu bar.

Using Commands

hdc is a command line tool used for debugging. You can use this tool to capture screenshots. For details about hdc, see hdc.

hdc shell snapshot_display -f /data/local/tmp/0.jpeg  // -f specifies the directory for saving the image on the device. If this parameter is not specified, the default directory is displayed after the command is executed.
hdc file recv /data/local/tmp/0.jpeg  // Send the image from the device to a local directory. In this example, the image is sent to the directory where the hdc command is executed.