SAP Knowledge Base Article - Public

2877442 - How to debug Scripts in Analytics Designer Debug Mode


You would like to debug your scripts in Analytics Designer during the runtime.

In below example, the application has two Text widgets and one button.


The script in the onClick function will copy TextA to TextB.

var text = Text_1.getPlainText();

You want to set a breakpoint before setting the value to Text_2, so that you can watch the value returned by getPlainText for Text_1 during the runtime.


SAP Analytics Cloud 1.0

Reproducing the Issue

Run the Analytics Application.


  1. Add the "debugger;" statement in your scripts
    This statement emulates the creation of a breakpoint in your script. You don't have to explicitly set a breakpoint in a script that needs to be debugged, but the script will automatically halt its execution as soon as the debugger; statement in your script is interpreted.

    var text = Text_1.getPlainText();

  2. Activate the debug mode by adding the URL parameter debug=true to your analytic application.
  3. Press F12 to open the development tools of the Web browser (Google Chrome).
  4. Click the button to call onClick function, the development tools view shows "Sources" tab and stopped at "debugger;" statement.
  5. In the file tree on the left side, expend sandbox.worker.main. Under AnalyticApplication, you'll find the folder with your application's name. You'll find the scripts that you've already executed for your current application in this folder.
  6. You can click the line to add a breakpoint.
  7. You can use the debug buttons on the right top side. For example, step over, step into.
  8. You can add watch expressions in "Watch" section.

See Also


SAC, SAP Analytics Cloud, Analytics Application Designer, API, Analytics Designer, Analytic Designer , KBA , LOD-ANA-AD , Analytics Designer , How To


SAP Analytics Cloud 1.0