Debug A Webpage In a Mobile Device Using WEINRE

It describes how to debug a mobile webpage in a phonegap application.
Weinre is used to debug a mobile web page remotely.

When using  weinre, there are three programs interacting with each other.

 Debug Server

It’s the HTTP server that’s used by the  Debug Client  and  Debug Target.

 Debug Client

the web page which displays the Elements and Console panels for debugging

Debug Target

the web page in the mobile device that need to debug.

Downloading, installing and running the Debug Server:

->Download the weinre-jar.zip from the following link

http://people.apache.org/~pmuellr/weinre/builds/1.x/

→Then unarchive it

->To run weinre from the jar file, execute the following command:

c:\> java -jar path_to_weinre.jar [options]

 Options available are:

--httpPort [portNumber]

        --boundHost [hostname | ip address | -all-]

        --reuseAddr [true | false]

         --readTimeout [seconds]

         --deathTimeout [seconds]

 
Debug client:

->here suppose the Debug Client is Crome browser.

->Now go to the address

http://localhost:[portNumber]/client/

*portNumber is the port with which server is running

Debug Target:

The page which you want to debug just put the following script in that page.

where a.b.c.d is your ip address

->Now run the app in the device

->when the page(Debug Target) will be load a new target will appear under the Targets in the Debug      Client.

->Now you can debug the page.

for more details please refer the following link

http://people.apache.org/~pmuellr/weinre/docs/latest/Home.html

150 150 Burnignorance | Where Minds Meet And Sparks Fly!