SAP Analytics Cloud, Analytics Designer Feature of the Day: In Browser Script Debugging
Let’s start in an app with a script that we’d like to debug. For our example here, we’ll use a dropdown widget, called Dropdown_1.
There are two ways to find the script that you want to work on. The first is to find the .js file directly. Look in sandbox..worker.main.xxx (xxx is a generated UUID). There you will find the application and all of the currently available scripts. Note that scripts are only available in the browser, once they have been run the first time. You can see here that the application onInitialization() event and the onResultChanged() for a pair of widgets have run. Additionally, I have already selected the dropdown, so that its onSelect() event script is in the browser.
The second way to find the script is to search for it. Select the top of the app, right click and select Search in all Files.
Down in the search bar, type in the name of the widget. The script will show up in the search list.
Select it and you have access to it in the browser. Note that it does not look excatly like in the editor. Blank lines and comments have been stripped out and the script has been nested inside boilerplate. You can still follow your code easily enough. Set a breakpoint and re-run the event. Have fun debugging!