8 Note The Safari browser should have been installed to your PC to use Web Inspector in LG IDE. Debugging on LG Smart TV Emulator 2011 1. In IDE, click Run Emulator Debug Configuration menu or toolbar icon. WebOS TV SDK for VS Code Generate/Run/Debug your apps with webOS TV devices Prerequisites. WebOS TV SDK CLI must be the latest version. Installation link is here.; The same version of Chrome(chromium) on webOS TV is required to run webOS TV: Inspect Application and webOS TV: Debug Application commands.
Welcome to the webOS Open Source Edition (OSE)! This page will guide you through the process of setting up the environment and developing your first app.
Environment Setup
First, let’s set up your environment.
webOS OSE provides you with two options for the target environment.
- Real device: For those of you who want to test on a real device, webOS OSE supports Raspberry Pi (RPi).
- webOS OSE 2.0 officially supports Raspberry Pi 4 Model B.
- webOS OSE 1.x officially supports Raspberry Pi 3 Model B.
- Emulator: For developers who don’t have RPi on hand or prefer to work on a virtual environment, webOS OSE provides the emulator as a part of its SDK.
You need to create an image for the desired target and prepare the target environment.
Real Device
- Before you begin, check the system requirements.
- Build the source code to create an image for RPi. Ensure that you set up the build for RPi at the configuration step.
- Flash the built image to RPi.
- Set up networking between the host machine and RPi.
- If you use webOS OSE 2.0 or higher and RPi 4 for a target device, consider setting up dual displays.
Emulator
- Before you begin, check the system requirements for the build system, host machine, and the emulator host.
- Build the source code to create an image for the emulator. Make sure that you set up the build for the emulator at the configuration step.
- Set up the emulator by following the steps in emulator user guide.
Your First webOS OSE App
If you finished setting up the environment, it’s time to start developing your first app running on webOS OSE, which will be an external web app.
Install CLI
To develop an external web app, you will use Command-Line Interface (CLI), which is provided as a part of webOS OSE SDK. You can also use CLI to develop external JavaScript (JS) services.
Proceed to install CLI for your operating system.
Develop the External Web App
Follow the steps described in the Developing External Web Apps tutorial.
What’s Next
- If you are interested in developing an external JS service, which will be packaged along with the web app you’ve just created, check the Developing External JS Services tutorial.
Generate/Run/Debug your apps with webOS TV devices
Prerequisites
- webOS TV SDK CLI must be the latest version. Installation link is here.
- The same version of Chrome(chromium) on webOS TV is required to run webOS TV: Inspect Application and webOS TV: Debug Application commands.
Installation
- Open Extensions(
Ctrl+Shit+X
). - Search
webOS TV
and install it from the Marketplace.
Configuration
(Required) Set the path of Chrome executable for debugging apps on webOS TV with the web inspector.
webostv.chromeExecutable
: Location of Chrome executable for debugging, e.g.C:webOS_TV_SDKIDEchromiumchrome.exe
(Optional) To skip selecting a device every time you run a command, set a default device.
webostv.defaultDevice
: Default device name, e.g.emulator
You can modify your settings from File > Preferences > Settings (Ctrl+,
)
Connecting Device
To run or debug apps on the device(except the emulator), developer mode and SSH key should be set. Please refer to here for more information.
Step1. Developer Mode
- Install the Developer Mode app from LG Content Store.
- Launch the Developer Mode app and login.
- Click the Dev Mode Status button to be ON.
Step2. Device Registration
- Select webOS TV: Set Up Device from the Command Palette(
Ctrl+Shit+P
) and select Add Device.
You can also click on the Add Device icon in the webOS TV Devices in the Activity Bar. - Enter your device name.
- Enter the device's IP address.
- Enter the device's port number for connection. In most situation, simply press 'Enter' to set it as the default value(22).
- Enter the device's username for connection. In most situation, simply press 'Enter' to set it as the default value(root).
Step3. SSH Key Setting
- After turning on the Developer Mode on the device, launch the Developer Mode app.
- Click the Key Server button to be ON.
- Select webOS TV: Set Up SSH Key from the Command Palette(
Ctrl+Shit+P
) and select the device.
You can also right-click on the device and select Set Up SSH Key in the webOS TV Devices in the Activity Bar. - Enter the passphrase (case sensitive) as displayed on the Developer Mode app.
Developing with Command Palette
To see all available webOS TV commands, open the Command Palette and type webOS TV
.
Part1. Developing App
- webOS TV: Generate Project - Create a web app from a template.
- webOS TV: Preview Application - Runs a web server for testing local app files.
- webOS TV: Package Application - Package the app into a package file (.ipk) that is stored in a specified directory.
Part2. Connecting Device
- webOS TV: Set Up Device - Add, modify, or remove devices from the devices list.
- webOS TV: Set Up SSH Key - Get a private key from webOS TV device. After getting the private key, you can install, launch apps or run other commands on webOS TV.
Part3. Testing App on Device
- webOS TV: Install Application - Install an app on the device.
- webOS TV: Launch Application - Run an app installed on the device.
- webOS TV: Inspect Application - Run Web Inspector and open the browser. Web Inspector displays the running information about your app.
Part4. Batch Commands
- webOS TV: Run Application - Package, Install, and Launch are executed sequentially.
- webOS TV: Debug Application - Package, Install, and Inspect are executed sequentially.
Browser Webos Emulator
Developing with Inline/Context Menus
Part1. Explorer
- Explorer Context Menu
- webOS TV: Install Application - Install the selected app package file(.ipk) on the device.
- webOS TV: Run Application - Install and Launch the selected app package file(.ipk) on the device.
Part2. Activity Bar
You can run some commands from webOS TV Devices in the Activity Bar.To activate the extension, click the Refresh icon at the first.
Browser Webos Emulator Free
- Device Inline Menu
- Refresh - Refresh the list of devices.
- Add Device - Add a device to the list.
- Modify Device - Modify the selected device.
- Remove Device - Remove the selected device.
- Device Context Menu
Refresh - Refresh the installed and running apps list of the selected device.
Install Application - Install an app on the selected device.
Set Up SSH Key - Get a private key from the selected device.
Extend DevMode Session - Extends the Developer Mode session time of the selected device. This command is not in the Command Palette.
Note that it only works when the Developer Mode is on and the session time remains longer than 0min.Show Information - Retrieves the following system information of the selected device. This command is not in the Command Palette.
- Model Name
- SDK Version
- Firmware Version
- Board Type
- OTA (Over The Air) ID
Note that only the retrieved information is displayed if some system information cannot be retrieved.
- App Context Menu
Note that the installed and running app list can be refreshed only when the device is connected.- Run - Run the selected app on the device. It is same as webOS TV: Launch Application command in the Command Palette.
- Debug - Run Web Inspector and open the browser. Web Inspector displays the running information about your app. It is same as webOS TV: Inspect Application command in the Command Palette.
- Uninstall - Uninstall the selected app from the device. This command is only for installed apps and is not in the Command Palette.
- Close - Close the selected app in the device. This command is only for running apps and is not in the Command Palette.