一、安装Android模拟器并调试
1.下载并安装Android Studio。
2.创建简单project。

3.安装模拟器。


完成安卓模拟器的安装。
4.启动模拟器。

5.hbuilderx选择模拟器、运行。

点击刷新按钮后出现模拟器,勾选并运行。

6.调试。
在 HBuilderX
中,项目启动后,在下方的控制台选择 debug
图标。

打开调试窗口后,显示如下:

7.模拟器展示窗口。

二、安装IOS模拟器并调试
iOS模拟器只能在MacOSX上安装。
1.先安装xcode。
2.打开xcode,选择Setting,下载并安装模拟器。

选择platforms,找到ios。点"GET",等待下载模拟器。我这里是已经下载完了。

下载完后会自动完成安装。
点击【Locations】,点击【Command Line Tools】 。

3.hbuilderx选择模拟器并运行。
4.调试
运行uni-app uts项目到iOS,运行成功后,HBuilder控制台点击红色虫子
图标,下拉菜单选择【uts调试】,即可开启uts调试功能。

uts调试,依赖uts调试插件,弹窗提示安装依赖插件,请务必点击安装,否则无法进行调试。