Embed JS Console within website

前端 未结 3 1234
孤城傲影
孤城傲影 2020-12-18 00:46

I want to embed a JS-Console within a website for extended debugging purposes. Are there any libraries or hooks available? How can I catch console.log messages?

3条回答
  •  悲&欢浪女
    2020-12-18 01:18

    You can override console.log

    script :

    if (window.console) console = { 
        log: function(){
            var output='',
                console=document.getElementById('console');
            for (var i=0;i

提交回复
热议问题