Using JS Debugger : 2012 and Later Emulators

Published 2014-10-28 | (Compatible with SDK 3.5,4.5 and 2012,2013 models)

This document explains how to use the JS Debugger with the 2012 and later Emulators


To learn about the 2010 and 2011 Emulators, please read Using JS Debugger: 2010 and 2011 Emulators.

Launch Web Inspector

Figure 1: Debug and Application with Web Inspector

To debug a project, select Samsung Smart TV SDK ‣ Debug Samsung Smart TV App using Web Inspector


If this option is disabled, make sure the project’s root folder is selected in the Project Explorer pane on the left

Figure 2: Emulator and Web Inspector

Viewing a JavaScript File

To view a JavaScript file in the debugger, click the Scripts button (1) and then click the Folder icon (2). Double-click on the filename (3) to see the JavaScript code.

Figure 3: Selecting the JavaScript File

Figure 4: Viewing the JavaScript File

Add a Break Point

To add a break point, right-click on the JavaScript file’s margin (over the line numbers) and select “Add Breakpoint”. When the program is executed, it will halt at the break point.

Figure 5: Adding A Break Point

Remove a Breakpoint

To remove a breakpoint, right-click on the breakpoint and select “Remove Breakpoint”.

Figure 6: Removing a Breakpoint


The Continue feature is used to navigate to the next breakpoint if the control is halted at a breakpoint. If there are no further breakpoints, it causes the script to execute until the end. The figure below shows the program halted on line 27. To continue, click the Play button.

Figure 7: Halted on Line 27

The execution is navigated to line 35 where the next breakpoint is.

Figure 8: Execution point moves to the breakpoint on line 35

Step Over

The Step Over feature is used to go to the next line of code.

To step over:

  1. Select the Debug menu.
  2. Click the Step Over item. The program execution halts at the next line.

Figure 9: Step Over item in the Debug menu

When you click Step Over, the execution point moves to the next line.

Figure 10: Execution point moves to line 25

Step Into

The Step Into feature is used to move into a function and halt on the next line.

To step into a function:

Click the Step Into item. The program execution moves to the function and halts on the next line.

Figure 11: Step Into item in the Debug menu

Figure 12: After Stepping Into The Function

Step Out

The Step Out feature is used to finish running the current function and then halt in the calling function.

To step out:

Click the Step Out menu item. The program execution finishes the current function and halts in the calling function.

Figure 13: Step Out item in the Debug menu