debug javascript in android emulator with phonegap

前端 未结 16 2093
抹茶落季
抹茶落季 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:25

    Update Nov 2016: looks like this doesn't work anymore.

    The easiest and one of the most powerful ways is using http://debug.phonegap.com (it uses Weinre in the background, if you care). You just

    1. pick a random string, say r4nd0m,
    2. inject into your index.html
    3. visit http://debug.phonegap.com/client/#r4nd0m and you will instantly be debugging your mobile web app.

    Things you can do (similar to Firebug or Web Inspector):

    1. Viewing and changing the DOM
    2. Editing CSS
    3. Console for live debugging and running Javascript remotely.
    4. Other stuff, like: storage, resources, timeline, profile, etc.

提交回复
热议问题