Weinre (Web Inspector Remote) is a remote inspector that can be used to debug your HTML-based mobile applications generated by ColdFusion. If you have already used PhoneGap for building applications and Weinre for debugging applications, you will find the Weinre support in ColdFusion very easy to use.
The following illustration depicts how you can inspect and control your mobile applications through the Weinre client:
Let us assume that you are packaging your ColdFusion-based mobile application into a platform-specific build targeting a particular device. You need to follow these broader steps to successfully inspect your application installed on the device:
The following section describes these steps in detail.
| Note: A Weinre inspection server is bundled with the ColdFusion Server. All that you need to do is start the local Weinre Server and start remotely inspecting your applications installed on devices. |
To start the local Weinre Server, perform the following tasks:
To configure a remote Weinre Server, perform the following tasks:
When you have a local Weinre Server running, right-click the ColdFusion Mobile project, select Properties > ColdFusion Mobile Project and click the Inspect tab. Enter the Weinre Server URL. If a local Weinre Server is running provide the loopback address. You can provide a unique ID/GUID that will identify your debug sessions in the Weinre Server.
See this section.
You need to connect the mobile device to the same network as your Weinre Server. When the application is running on your device, open a remote browser and type the URL of the Weinre client that you have obtained in Step 1.
You will see the Weinre client interface. The Targets section lists the applications running on all connected devices available for inspection. When the hyperlink is green, the application is ready for inspection. Click the link to see the source code of the running application:
Start inspecting your application. For more information on the Weinre user interface, see this web page.
For a web-based mobile application (not a packaged PhoneGap build), the steps mentioned above are applicable except for a few minor changes. The mobile will request for a web page with a query parameter of INSPECT in the URL. You can manually provide the URL parameters as follows:
| Note: Note that in the case of static files, Weinre inspection will work only if these files are served by the ColdFusion Server. If the static files are served from any other server like Apache or IIS server, the inspection may not work. |
Sign in to your account