Add to the body of the page you want to inspect; it redirects js errors to a div attached to the bottom of the window:
<style type="text/css">
#debugWindow {
position:fixed;
display:block;
bottom:0;
left:0;
width:100%;
height:150px;
border:1px solid red;
background-color:#FFF;
overflow:scroll;
z-index: 10000;
}
</style>
<pre id="debugWindow"></pre>
<script type="text/javascript">
let yerror = function(msg, url, linenumber) {
$('#debugWindow').append(url+', line '+linenumber+String.fromCharCode(10)+msg+String.fromCharCode(10));
return true;
};
window.addEventListener('error', yerror);
window.console.log = function(msg) {
$('#debugWindow').append(' # '+msg+String.fromCharCode(10));
};
</script>