CentOS default repository is very limited, and even if you install EPEL you will get old packages, in my case I needed to install Supervisor to manage my Django application, after trying to do it manually and through EPEL I ended up with the following setup.

Install Needed Package

1

2

3

4

sudo yum install python-setuptools

sudo easy_install pip

sudo pip install supervisor

Setup Supervisor

We’ve already installed “Supervisor” globally, but we need to create its configuration, luckily it comes with default config:

1

2

3

4

5

6

7

8

9

10

echo_supervisord_conf > supervisord.conf

sudo cp supervisord.conf /etc/supervisord.conf

sudo mkdir /etc/supervisord.d/

sudo vim /etc/supervisord.conf

:

[include]

files = /etc/supervisord.d/*.conf

:

Next we need to set “Supervisor” to run automatically every time you restart your machine, we need to create /etc/rc.d/init.d/supervisord with the following content:

官方教程

Cordova debugging

Debugging your Application

With the desktop browser, you can leverage the browser’s debugging tools. In a WebKit browser, you can open WebInspector to inspect the DOM and debug JavaScript. Most other browsers have an equivalent debugging tool.

Additional Tools

PhoneGap Emulator uses Ripple to emulate the PhoneGap API.Ripple Emulator emulates the PhoneGap API.ScreenQueri.es to preview exact device screen sizes.thumbs.js is a TouchEvent polyfill.PhoneGap Desktop is a mocking library for the PhoneGap API.

Remote Web Inspector

After you’ve developed the first stage of your application with your desktop browser, you will want to test it on a mobile device. The main hurdle with testing on a mobile device is that you will not have access to WebInspector. This is where a remote web inspector steps in.

Safari Remote Debugging

If you are doing iOS PhoneGap debugging and have the Safari Develop Menu enabled, you can access the currently active session through the built-in Safari Web Inspector. To activate, go to Develop -> (iPad || iPhone) Simulator (normally, the third menu item) and click the active session you want to connect to. Voila!

Chrome Remote Debugging

If you are doing Android PhoneGap debugging and have an Android 4.4 device and Chrome 30+, you can use the new WebView Debugging tools added in Android 4.4. If you are using Cordova 3.3 or higher, this is already supported, and only requires the Debuggable flag in your AndroidManifest.xml. For Cordova 3.2, you will need to enable WebView debugging using some code, or by use of a plugin.

GapDebug

A complete iOS and Android debugging experience for PhoneGap and Cordova apps, debug on both Windows and Mac platforms. Automated plug-and-go debugging with no requirement to build debug support into your app. GapDebug integrated versions of the Safari Webkit Inspector for iOS debugging and Chrome Dev Tools for Android debugging. GapDebug is maintained by Genuitec and is a always free tool.

Try GapDebug here.

Weinre

Weinre is a remote WebInspector that will debug any browser remotely. It is not quite a full-fledged debugger, but gives you a live view of the DOM and access to the JavaScript lang:bash. Unfortunately, no breakpoints or stack traces are available, but the JavaScript lang:bash can lend clues about errors.

You can run Weinre locally or use debug.phonegap.com.

WebKit’s Remote Web Inspector

WebKit has the ability to connect it’s WebInspector to remote WebKit browsers, although few mobile platform support this feature.

jsHybugger is a (commercially available) tool that lets you debug PhoneGap apps on Android using Chrome DevTools. A plugin for PhoneGap 3.x and library for PhoneGap 2.x is available. Install jsHybugger from GitHub with the following command. This adds the plugin to your PhoneGap 3.x application.

Enable the Safari debug menu Web Browsers

While I look around Safari binary code, I found there is a hidden Debug menu. Type the following command in Terminal (while Safari is NOT running): % defaults write com.apple.Safari IncludeDebugMenu 1Then launch Safari, and enjoy the new Debug menu.

[Editor’s note: The debug menu has some useful options on it, so you may find this a very useful hack. If you ever wish to disable it again, just repeat the command with a “0” instead of a “1”.]

I tried the answer described here but it doesn´t worked for me. I have the last Android SDK tools ver. 23.0.2 and Android SDK Platform-tools ver. 20

The support library android-support-v4.jar cause this conflict, just delete the library under /libs folder of your project, don´t be scared, the library is already contained in the library appcompat_v7, clean and build your project, and your project will work like a charm!