debugger js

JavaScript
//In code:

console.log(theVariable);

//Then in browser:
F12
Source

Also in JavaScript: