Oniro IDE is a lightweight, integrated development environment as a Visual Studio Code Extension tailored for Oniro/OpenHarmony application development. It provides a streamlined workflow for building, signing, deploying, running, and debugging Oniro apps, as well as managing SDKs and emulators.
- Oniro Tree View: Access all Oniro development actions from a dedicated sidebar, including build, sign, emulator control, app install/launch, SDK Manager, and HiLog Viewer.
- Project Creation: Create a new Oniro/OpenHarmony (ArkTS/ArkUI) project from a template, with initial SDK/module configuration and workspace settings.
- Build and Sign: Compile and sign your Oniro/OpenHarmony application with a single command.
- Emulator Management: Start, stop, and connect to the Oniro emulator directly from VS Code.
- App Deployment: Install and launch
.happackages on the emulator or connected device. - Run All: One-click workflow to start the emulator, build, install, and launch your app, then open the HiLog Viewer for live logs.
- HiLog Viewer: View and filter real-time logs from your running Oniro app within VS Code.
- SDK Manager: Install, update, or remove OpenHarmony SDKs, command-line tools, and the Oniro emulator via a graphical interface.
- Oniro Tasks: Run Oniro-specific build tasks from the VS Code task system.
- Debugging: Debug Oniro applications using the "Oniro Debug" configuration.
- Node.js (LTS recommended)
- Java SDK (for building/signing apps)
- QEMU (for running the Oniro emulator)
Ensure all dependencies are installed and available in your PATH.
Install Oniro IDE from either:
- Visual Studio Code Marketplace: https://marketplace.visualstudio.com/items?itemName=francescopham.oniro-ide
- Open VSX Registry (for VSCodium / compatible IDEs): https://open-vsx.org/extension/francescopham/oniro-ide
Steps (VS Code or compatible):
- Open the Extensions view (Ctrl+Shift+X).
- Search for Oniro IDE.
- Click Install.
# Clone the repository
git clone https://github.com/eclipse-oniro4openharmony/oniro-vscode-ext.git
cd oniro-ide
# Install dependencies and build
npm install
npm run compile
# Open in VS Code and launch extension host
code .
# Press F5 to start the Extension Development Host- Install and enable the Oniro IDE extension in VS Code.
- Use the Oniro sidebar to access all main actions, or open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P) and search for Oniro commands. - Create a new project:
- Run Oniro: Create Project (
oniro-ide.createProject). - Choose a template, project name, bundle name, location, SDK API, and module name.
- Click Create and then Open Project.
- The extension creates
local.properties(withsdk.dir=...) so the build uses the installed SDK base directory.
- Run Oniro: Create Project (
- Typical workflow:
- SDK & Tools Setup: Open the SDK Manager from the sidebar to install or update the required OpenHarmony SDKs, command-line tools, and the Oniro emulator before starting development.
- Signature Configs: If your application does not already have signing configurations, generate them using the Oniro IDE (see sidebar or command palette for signature config generation commands).
- Build and Sign: Use Oniro: Build App and Oniro: Sign App to prepare your application.
- Emulator: Start the emulator with Oniro: Start Emulator and connect if needed (Oniro: Connect Emulator).
- Deploy: Install your
.happackage using Oniro: Install App and launch it with Oniro: Launch App. - Run All: Use Oniro: Run All (Emulator, Build, Install, Launch) for a full automated flow, including log streaming.
- HiLog Viewer: View logs for your running app with Oniro: Show HiLog Viewer.
oniro-ide.createProject: Create a new Oniro project from templateoniro-ide.runAll: Run all steps (start emulator, build, install, launch, and open HiLog Viewer)oniro-ide.build: Build the Oniro apponiro-ide.sign: Sign the Oniro apponiro-ide.startEmulator: Start the Oniro emulatoroniro-ide.stopEmulator: Stop the Oniro emulatoroniro-ide.connectEmulator: Connect to the running emulatoroniro-ide.installApp: Install the app on the emulator/deviceoniro-ide.launchApp: Launch the app on the emulator/deviceoniro-ide.openSdkManager: Open the Oniro SDK Manageroniro-ide.showHilogViewer: Open the Oniro HiLog log viewer
This extension contributes the following settings (see VS Code settings for details):
oniro.sdkRootDir: Root directory where OpenHarmony SDKs are installed. Default:${userHome}/setup-ohos-sdkoniro.cmdToolsPath: Directory where OpenHarmony command-line tools are installed. Default:${userHome}/command-line-toolsoniro.emulatorDir: Directory where Oniro emulator is installed. Default:${userHome}/oniro-emulator
Please report issues and feature requests via the GitHub repository.
To allow the integrated F5 launch shortcut to automatically execute the Oniro "Run All" workflow, add the following configuration to your .vscode/launch.json file:
{
"version": "0.2.0",
"configurations": [
{
"name": "Oniro: Launch App (with Run All)",
"type": "oniro-debug",
"request": "launch"
}
]
}This will let you use F5 or the "Run" button in VS Code to trigger the Oniro "Run All" command for building, deploying, and launching your app.
For additional integration for the ArkTS language, use the ArkTS VS Code plugin, which supports source code navigation and completion. It also supports codelinter to detect errors.
Enjoy developing with Oniro IDE!
