A comment line starts with two forward slashes // at the beginning of the line.
To validate JavaScript code, click Compile. The result of the validation is displayed in the Tasks tab of the Monitor area at the bottom area of the Procedure Editor.
The Editor offers some efficient features to trace the execution of a script. You can step through a code line-by-line or step through from one Breakpoint to another. At any time, you can check the current value of a variable.
The JavaScript Editor and Debugger will work without having input data at the input port of the component. However, in order to produce meaningful results, it is best to populate the input port with data before using the debugging features.
Before stepping through the script, either validate the script or switch to Debug mode.
A green arrow, pointing initially to line 1, indicates the progress of the execution while stepping.
Make sure, that the result message in the Task tab contains “successful compilation.”
To move to the next line, click Step.
At any point during stepping you can inspect the current value of a variable. To do this, double-click the variable to select it, and then right-click to open the pop-up menu. The pop-up menu displays the variable name and the current value.
Rather than stepping through the procedure line-by-line, you can include Breakpoints at selected lines.
To include Breakpoints, click on the line where you want to set the Breakpoint.
Right-click and select Add/Remove Breakpoint from the pop-up menu.
To remove a Breakpoint, right-click it and select Add/Remove from the pop-up menu.
Click Go for each step.
Click Go on the last breakpoint to execute the rest of the script.