Custom IML functions

Debug custom IML functions with a variety of tools

To debug your IML functions, output the code and use a tool of your choosing.

Output a message to the dev console

You can use debug inside your IML functions to print a message or mid-results of your code. During the function execution, debug messages are visible inside the console of your browser.

circle-info

To open the developer console in Google Chrome, open the Chrome Menu in the upper-right-hand corner of the browser window and select More Tools > Developer Tools. You can also use Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux).

function add(a, b) {
    	let sum = a + b;
    
        //instead of usual console.log(), use debug().
        debug("a = " + a) 
	debug('b = ' + b)
	debug(`a+b = ${sum}`)
	
	return sum;
}
circle-info

By using debug() you can understand what data you are manipulating inside a function.

Debug the JavaScript snippet

To debug the output, you can use a variety of tools. Search online to find a JavaScript debugging tool that you prefer.

Here are some to choose from:

circle-info

You can use this code to test the functionality of the JavaScript debugger to see how it works.

Last updated