Finding Your Scripts in the Web Browser's Development Tools

Before you start debugging your scripts, learn how to find and view them in the development tools of the Web browser (Google Chrome).

To find an authored script in the Web browser's development tools, you need to run the script at least once during the current session.

Note

Before executing your scripts in the runtime, the analytics designer transforms them. This is why the JavaScript in the Web browser's development tools doesn't look exactly the same as the scripts you wrote in the script editor during design time.

Viewing The Scripts in Your Analytic Application

To view the scripts you wrote in your analytic application, just run the application and press F12, which opens the Web browser's development tools.

Finding Scripts By Searching For Script Names

To search for a script by its name, press F12 to open the development tools and press Ctrl + P to open the search field. Enter the name of the script to search for.

The names of the scripts follow a specific scheme: <WIDGET_NAME>.<FUNCTION_NAME>.js. The scripts are grouped in a folder named <APPLICATION_NAME> where the components of the scripts' names have the following meaning:

Components of Script Names
Key Description
APPLICATION_NAME the name that you set for your application when you saved it
WIDGET_NAME the name of the widget/element in your application
FUNCTION_NAME the name of the function/event handler that holds the script you wrote

If you defined a script for the onInitialization event of your application, the WIDGET_NAME will be automatically set to "Application".

Note

Special characters in your application name will be replaced by "_", except "-" and "." which will be kept as they are.

Example

Let's assume you have an application called "My Demo Application" that contains a button called "Button_1" with an onClick event handler. The name of the script would be Button_1.onClick.js and it would be located in a folder called My_Demo_Application.

Finding Scripts By Browsing the File Tree
To find a script by using the file tree on the left side of the development tools, press F12 to open the development tools and select the Sources tab. On the top level of the file tree, search for the entry that starts with 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.