https://github.com/mmiscool/stack-overflow-javascript-debugger-
Add a stack overflow javascript debugger to your project. This will allow javascript errors to be automagicaly caught and searched on stack overflow
https://github.com/mmiscool/stack-overflow-javascript-debugger-
Last synced: about 1 month ago
JSON representation
Add a stack overflow javascript debugger to your project. This will allow javascript errors to be automagicaly caught and searched on stack overflow
- Host: GitHub
- URL: https://github.com/mmiscool/stack-overflow-javascript-debugger-
- Owner: mmiscool
- License: mit
- Created: 2018-10-11T03:25:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-11T03:28:20.000Z (over 7 years ago)
- Last Synced: 2026-04-30T08:29:05.944Z (about 2 months ago)
- Language: HTML
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stack-Overflow-javascript-debugger-
Add a stack overflow javascript debugger to your project. This will allow javascript errors to be automagicaly caught and searched on stack overflow
Add the below snipet to any html file and the debugger will be there.
Have fun
```
Show debugger
showCrazyFunDebugger = false;
window.onerror = function(msg, url, line, col, error) {
var extra = !col ? '' : '\ncolumn: ' + col;
extra += !error ? '' : '\nerror: ' + error;
//alert("Error: " + msg + "\nurl: " + url + "\nline: " + line + extra);
// $("#debuggerList").append(new Option( error, error));
StackOverflowDebuggerList = document.getElementById("StackOverflowDebuggerList")
StackOverflowDebuggerList.options[StackOverflowDebuggerList.options.length] = new Option(error, error);
var suppressErrorAlert = true;
return suppressErrorAlert;
};
function toggleStackOverflowDebugger(){
if(showCrazyFunDebugger != undefined && showCrazyFunDebugger != true){
showCrazyFunDebugger = true;
}
else{
showCrazyFunDebugger = false;
}
if (showCrazyFunDebugger == true){
document.getElementById('debuggerDiv').style = 'position: fixed;top: 10%;left: 10%;';
}else{
document.getElementById('debuggerDiv').style = 'display:none';
}
}
``