How can I make a common function in my global.js to for calling debugger; in JS. I'll basically set a value whether to debug or not. I tried the following but it's not working. Any lead will be appreciated.
<script type="text/javascript">
var debugModeVal = 1;
debugMode = function()
{
if(debugModeVal)
{
debugger;
}
return;
}
</script>
I am calling from my html file like this
<script type="text/javascript">
function callAnotherFunction()
{
debugMode;
}
</script>