Custom IML functions
Debug custom IML functions with a variety of tools
Last updated
Debug custom IML functions with a variety of tools
To debug your IML functions, output the code and use a tool of your choosing.
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.
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;
}By using debug() you can understand what data you are manipulating inside a function.

During the run of a module, IML functions called inside this module will also run.
All debug messages that you specified in the IML function are available inside the developer console of your browser.
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:
You can use this code to test the functionality of the JavaScript debugger to see how it works.
Last updated
function myFunction(x) {
x = x + 1;
//do something
console.log(x); // outputs the value of x at this point
return x;
}
myFunction(1);
