debug javascript in android emulator with phonegap

前端 未结 16 1807
抹茶落季
抹茶落季 2021-01-30 02:45

I am new to phonegap and android development. May I know how can I debug javascript error on the emulator? I have heard about ADB may I know how can I use and install it on wind

16条回答
  •  孤独总比滥情好
    2021-01-30 03:46

    The best solution to catch exceptions and show in your console is this code:

    window.onerror = function(msg, uri, line) {
        console.log(msg + uri + line);
    }
    

提交回复
热议问题