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 web 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.
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;
}
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:
function myFunction(x) {
x = x + 1;
//do something
console.log(x); // outputs the value of x at this point
return x;
}
myFunction(1);
Last updated