Debugging NaCl Projects


This topic describes how to debug Native Client projects with the Tizen Studio.


Related Info


You can use the Tizen Studio debugger to test Native Client (NaCl) applications. The NaCl debugger is based on the Eclipse remote debugger. For more information on the remote debugger, see Remote Debugging.

Prerequisites

Before you debug the application:

Launching the Debugger

To debug the application with the default debug configuration:

  1. Create breakpoints in the source code by double-clicking in the source code editor left margin.

    Figure 1. Creating breakpoints
  2. Launch the debugger:
    • To debug the application in Google Chrome™, in the "Project Explorer" view, right-click the project and select "Debug As > Webpage in Chrome".
    • To debug the application on the emulator or a Samsung TV:
      1. In the Tizen Studio toolbar, select the emulator instance or TV from the drop-down menu.
      2. In the "Project Explorer" view, right-click the project and select "Debug As > Widget on a Tizen Device".

Customizing Debug Configurations

You can also customize the debug configuration. The process is similar to customizing the launch configuration.

To create and use a custom debug configuration:

  1. In the Tizen Studio menu, select "Debug As > Debug Configurations".

  2. Create the debug configuration you need:

    • To debug the application in Google Chrome™:

      1. In the side menu, double-click "Chrome Debug".
      2. Enter the configuration name, project name, and main HTML file path, and customize the launch parameters.
      3. In the "Chrome command" field, define the path to your Google Chrome™ executable file location.

        Figure 2. Chrome debug configuration
    • To debug the application on the emulator or a TV, in the side menu, double-click "Device Debug":

      1. Define the configuration name, project name, and ".wgt" file path.
      2. Select the emulator or TV you want to debug the application on.

        Figure 3. Device debug configuration
  3. Define the path to the compiled NaCl module (".nexe" file) in your project.

  4. If you want to set a debugging entry point, in the "Debugger" tab, fill the "Stop on startup" checkbox and define the entry function.

    Figure 4. Debugging entry point

  5. To start debugging, click "Debug".