Debugging WebAssembly Applications
This section describes how to debug WebAssembly modules in a Web application.
You can debug WebAssembly applications on an emulator or a Samsung device using the Developer's Tools component, which is started automatically whenever you start a debug session.
Before you can start the application on an emulator or a Samsung device:
- If you do not have a certified profile already, create one.
- Launch an appropriate emulator instance, or connect the device to the SDK.
To debug WebAssembly modules in a Web application:
In the "Project Explorer" view, right-click the Web application project and select "Debug As > Tizen Web Application".
Tizen Studio launches the application project on the connected emulator or device, and a DevTools window opens.
Navigate to the "Sources" tab, then select "Page" tab on the left hand side of the window so that the page tree is visible. Locate the wasm folder among others in the tree (see Figure 1).NoteIf you cannot see the folder, press F5 to reload the page.
Expand the folder and note that there are further folders - one per each WebAssembly module on the page. These folders can again be expanded and they contain several source files - one per each WebAssembly function in your module.NoteIn Tizen 5.5 TV application projects the source is visible as WebAssembly bytecode.
In the source files, you can set breakpoints, watch expressions and do other typical debug activities.
For example, to set a new breakpoint, 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 pauses on the set breakpoint.