Last active
September 22, 2017 23:11
-
-
Save vielhuber/cac969a8ad0146175f658a60ceefdd06 to your computer and use it in GitHub Desktop.
debug current variables (live) inside function scope #js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var debug = ["var1", "var2", "var3"]; | |
window.setInterval(function() { | |
$('#debug').remove(); | |
$('body').append('<div id="debug" style="position:fixed;top:0;left:0;"></div>'); | |
for(var item of debug) { | |
$('#debug').append(item+": "+eval(item)+"<br/>"); | |
} | |
},1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment