Debugging WebAssembly TV Application

This section describes how to debug WebAssembly modules in a TV application.

You can debug WebAssembly TV application on an emulator or a Samsung TV using the Developer's Tools component, which is started automatically whenever you start the debug session.

For information on debugging your application's other Web components, see TV Simulator, TV Emulator, and TV Device.

Before starting the application on an emulator or a Samsung TV:

To debug WebAssembly modules in a TV application:

  1. In the "Project Explorer" view, right-click the TV application project and select "Debug As > Tizen Web Application".

    The Tizen Studio launches the TV application project on the connected emulator or TV and then a DevTools window opens.

    Figure 1. DevTools Window

  2. Navigate to the "Sources" tab and select "Page" tab on the left hand side of the window so that the page tree is visible.

    You should see a wasm folder among others in the tree (see Figure 1).

Unfold the tree and you will notice that there are other folders - one per each WebAssembly module on the page. The folders may again be unfolded and there should be a bunch of source files visible.

There is one source file per each WebAssembly function in your module.

You can set breakpoints, watch expressions and do other typical debug activities.

For example, to set a new breakpoint just click the line number of the currently displayed code, where the breakpoint is to be set.

Now, when you reload the page, the WebAssembly execution will pause on the set breakpoint.

Figure 2. WebAssembly Execution Paused on a Breakpoint