javascript - How to display console messages to the user? -


sometimes there occurs errors , want display these console messages users when take screenshot can see error message (from framework use or console.log wrote, or normal javascriprt errors). possible?

simply want display messages in console user.

may helps you; use below code show "errors" on new window instead of inspect element (console log)..

//handle ajax error $(document).ajaxerror(function(e, jqxhr,ajaxsettings, thrownerror){         openerrorwindow(jqxhr.responsetext);         console.log(jqxhr);     });  //handle document error - example - function undefined     window.onerror = function(e) {         openerrorwindow(e);         console.log(e);     };  //open new window error message     function openerrorwindow(message){         var newwindow = window.open('');         newwindow.document.writeln('<title>console error</title>');         newwindow.document.writeln(message);     } 

Comments