Windows系统配置环境变量
1、在此电脑 > 属性 > 高级系统设置 > 高级 > 环境变量中,添加HDC端口变量名为:HDC_SERVER_PORT,变量值可设置为任意未被占用的端口,如7035。
2、在此电脑 > 属性 > 高级系统设置 > 高级 > 环境变量 > 系统变量中,将HarmonyOS SDK的toolchains完整路径添加到Path变量值中,具体路径信息以SDK实际配置路径为准
macOS系统参考官方链接:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hdc-0000001815246474
常用hdc命令使用指导
日志抓取
hdc hilog
查看设备列表
hdc list targets
获取进程信息和线程信息
hdc shell top
查看屏幕信息
hdc shell hidumper -s 10 -a screen
查看当前窗口信息
hdc shell hidumper -s WindowManagerService -a '-a'
获取应用信息
hdc shell aa dump -a
当前屏幕截图
hdc shell snapshot_display