Symptom
You would like to debug your scripts in SAP Analytics Cloud (SAC) Analytics Designer (Analytic applications) during the runtime.
In the example below, 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();
Text_2.applyText(text);
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.
Environment
SAP Analytics Cloud (Enterprise)
Reproducing the Issue
Run the Analytics Designer application.
Resolution
- 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();
debugger;
Text_2.applyText(text); - Activate the debug mode by adding the URL parameter debug=true to your analytic application.
https://<HOST>:<PORT>/sap/fpa/ui/app.html?tenant=<TENANT_NAME>#;mode=present&view_id=appBuilding&appId=<APPLICATION_ID>&debug=true - Press F12 to open the development tools of the Web browser (Google Chrome).
- Click the button to call onClick function, the development tools view shows "Sources" tab and stopped at "debugger;" statement.
- 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.
- You can click the line to add a breakpoint.
- You can use the debug buttons on the right top side. For example, step over, step into.
- You can add watch expressions in "Watch" section.
Keywords
SAC, SAP Analytics Cloud, Analytics Application Designer, API, Analytics Designer, Analytic Designer, SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, sap analyst cloud, predictive analytics (analysis), data analysis (analytics) tools, analytics tools, sap analytics cloud, data literacy, advanced analytics, data democratization, analytics software, real time analytics, self service analytics, advanced data analytics, analytics as a service, analytics cloud / cloud analytics, saas analytics, cloud bi, enterprise planning, cloud data analytics, cloud based analytics, analytics cloud platform, modern analytics, real time analysis, cloud analytics solution(s), what is sap analytics cloud, cloud analytics tools, analytics in the cloud, cloud analytics software epm, business intelligence, app, apps, code debuged , KBA , LOD-ANA-AD , Analytics Designer , How To