Question : javascript Using debugger
Answered by : samer-saeid
let a = 6;
let b = 9;
let c = a * b;
// stops the execution
debugger;
console.log(c);
Source : | Last Update : Sun, 29 May 22
Question : javascript web development debugging
Answered by : jessica-koekemoer
//In code:
console.log(theVariable);
//Then in browser:
F12
Source : | Last Update : Thu, 23 Apr 20
Question : JavaScript Debugging
Answered by : darshan-xngepy5waumk
// js debugging exercises
// use const and let instead of var
const val1 = 69; // const for non changing values
let val2 = 420; // let for changing values
// use lots of console logs
console.log(val2, 't1')
/* manipulate val2 here */
console.log(val2, 't2')
// note: add some sort of string while console logging,
// so it becomes easy to find & remove logs when code is working
// use try...catch for catching errors
try { /* your code here */
} catch (err) { /* handle errors here */ console.log(err, 'error')
}
Source : | Last Update : Wed, 06 Jul 22
Question : javascript debugger
Answered by : muhammad-hamza-shabbir
If you want to dubug the code
use this only "dubugger();" in the javascript code where you want to debug step by step
Source : | Last Update : Tue, 05 Jul 22
Question : JavaScript Debugging
Answered by : naly-moslih
<!DOCTYPE html>
<html>
<body>
<h1>My First Web Page</h1>
<script>
a = 5;
b = 6;
c = a + b;
console.log(c);
</script>
</body>
</html>
Source : | Last Update : Mon, 30 May 22
Question : javascript debugging methods
Answered by : anthony-smith
console.log('Hello, I am writing to the console.');
Source : | Last Update : Mon, 05 Jul 21