How to save the JavaScript errors in file

后端 未结 5 1482
栀梦
栀梦 2020-12-16 07:48

Need a solution for saving log of JavaScript errors. For automated testing any site with support popular web browsers (IE, FF, Chrome).

5条回答
  •  余生分开走
    2020-12-16 08:35

    Easiest way to do this is to setup a page that you can hit with a post, and on error, post the errors to that page. This requires catching all errors though, so you'd need to wrap your page in a try { .. } catch (e) { .. } statement.

提交回复
热议问题