36
Views
3
Comments
Solved
How to debug JavaScript code in a button click event in O11?

Hi everyone,

I have a button in my app that triggers some custom JavaScript code (added in a JavaScript node or through the button's event). I want to debug this code to check what's happening when the button is clicked.

Could someone please guide me on how to properly debug this JavaScript using browser DevTools or any other method in OutSystems?

Appreciate any help.

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi @Juvairiya Jabbar ,

You can use console.log() to display JavaScript values in the debugger window.

Example:

a = 5;
b = 6;
c = a + b;
console.log(c); 

Also, in the debugger window, you can set breakpoints in the JavaScript code. The debugger keyword stops the execution of JavaScript, and calls (if available) the debugging function. 

Example: 

let x = 15 * 5;
debugger;
document.getElementById("demo").innerHTML = x; 

_____

For reference please check these articles on JS Debugging: 


UserImage.jpg
Juvairiya Behzad

Hi,

Thank you so much for your helpful response! 

2024-12-10 04-40-04
Gitansh Anand
Solution

Hi @Juvairiya Jabbar, you can add 'debugger;' to create breakpoints in your JS, alternatively you can simply just add 'console.log();' at specific places to see what is happening.

Please refer to this for more details, JavaScript Debugging.

Thanks
Gitansh Anand

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi @Juvairiya Jabbar ,

You can use console.log() to display JavaScript values in the debugger window.

Example:

a = 5;
b = 6;
c = a + b;
console.log(c); 

Also, in the debugger window, you can set breakpoints in the JavaScript code. The debugger keyword stops the execution of JavaScript, and calls (if available) the debugging function. 

Example: 

let x = 15 * 5;
debugger;
document.getElementById("demo").innerHTML = x; 

_____

For reference please check these articles on JS Debugging: 


UserImage.jpg
Juvairiya Behzad

Hi,

Thank you so much for your helpful response! 

2024-12-10 04-40-04
Gitansh Anand
Solution

Hi @Juvairiya Jabbar, you can add 'debugger;' to create breakpoints in your JS, alternatively you can simply just add 'console.log();' at specific places to see what is happening.

Please refer to this for more details, JavaScript Debugging.

Thanks
Gitansh Anand

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.