Home

Awesome

<!-- * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. -->

cordova-weinre

Deprecation Notice

This project is being deprecated. No more work will be done on this project by the Cordova development community. You can continue to use this project and it should work as-is, but issues will not be fixed by the Cordova community.

weinre was built in an age when there were no remote debuggers available for mobile devices. Since then, some platforms are starting to provide remote debugger capabilities, as part of their platform tool set.

  1. Android: Get Started with Remote Debugging Android Devices
  2. iOS: Safari Developer Tools overview
  3. Windows: Debug Store apps in Visual Studio

IMPORTANT NOTE, some of weinre dependencies have security issues. Use on your own risk.

Introduction

weinre is WEb INspector REmote.

Pronounced like the word "winery". Or maybe like the word "weiner". Who knows, really.

weinre is a debugger for web pages, like FireBug (for FireFox) and Web Inspector (for WebKit-based browsers), except it's designed to work remotely, and in particular, to allow you debug web pages on a mobile device such as a phone.

weinre is part of the Apache Cordova project.

For descriptive information, and links to downloads, installable things, etc see: http://people.apache.org/~pmuellr/weinre/

weinre source

The weinre source is contained in 4 subdirectories:

building weinre

The weinre build is currently run on a Mac OS X 10.7 laptop. It also runs on Apache continuous integration servers running Linux. The build is not typically run on Windows, so if you have problems with that, please log an issue.

The weinre build pre-req's the following tools:

To update the npm-based pre-reqs, you will also need:

Before doing a weinre build, you will need to create the file weinre.build/personal.properties. Use the sample.personal.properties as a template. The build should fail if this file is not available.

To update the version label of weinre, edit the file weinre.build/build.properties. If the version has a -pre suffix, this triggers the build to artifacts with timestamped names. For an 'official' build, do not use the -pre suffix.

There are two ways to build weinre:

The full build creates all the artifacts needed for an 'official' build.

The development build just creates enough artifacts to test the code.

the first time you run any build:

Some semi-transient artifacts are created the first time you run a build. These will be stored in the weinre.build/cached directory.

to perform the full build:

This will run the development build (see below), and then create zip archives of the build in the weinre.build/out/archives directory.

to perform the development build:

This will populate a number of resources in the weinre.server directory, so that you can run weinre directly from that directory for testing. It does not build the archives.

performing a clean build:

other ant goodies:

to run the output of the development build:

other fun development-time hacks

If you have the wr tool installed, there is a .wr file available to run the development builds when a source file changes.

The build is growl-enabled, so you can see a quick message when the build completes, as long as the USE_GROWL property is set in the weinre.build/personal.properties file.

The command weinre.server/weinre-hot makes use of node-supervisor to re-launch the weinre server generated by the development build, whenever a weinre build completes.

Putting this altogether, you can open two terminal windows, run wr in the main directory to have a development build run whenever you change the source, and then run weinre-hot in the weinre.server directory to have the weinre server restart whenever a build completes, getting a growl notification at that time.

updating 3rd party libraries

IMPORTANT - All 3rd party libraries are stored in the SCM, so that the build does not require 3rd party packages to be downloaded. As such, these files need to be ok to use and store in the SCM, given their licenses. If you're adding or updating a 3rd party library, make sure the license is acceptable, and add/update the license in the top-level LICENSE file.

All of the 3rd party dependencies used with weinre are stored in one of two directories:

To update the files in weinre.build/vendor:

To update the files in weinre.server/node_modules: