myRemoteDebugger is an AngularJS module for web/hybrid applications integrated with Cordova/Phonegap.
It helps to keep track of what happens in the app during external tests.
It sends messages to server and provides a backend interface to take a look at the collected data.
Take a look at the Demo.
#Installation
In your index.html: ```HTML <script src="MyRemoteDebugger.js"></script> ```Inject module in your application:
angular.module('app', ['MyRemoteDebugger'])Set up your settings:
- URL: http://<path to your server>/backend/Api/frontend.php
- Database: <name of your database>
- Username: <username of your database>
- Password: <password of your database>
Click on Create tables button.
DONE!!
#Usage
myRemoteDebugger provides trackingService interface to send messages to server.
Every message is considered to be an EVENT.
Events are organized in SESSIONS.
Inject trackingService in your controller/service:
angular.module('app.controllers', [])
.controller('AppCtrl', function(trackingService) { }); #Functions
```Javascript trackingService.initializeSession('John','http://www.matteotoninidev.altervista.org/backend/Api/backend.php','myApp', '0.01') ``` Params:- user(required): <user of your application>
- url(required): http://<path to your server>/backend/Api/backend.php
- appName: <name of your application>
- appVersion: <version of your application>
Provides also informations about device/browser where the application is running. Cordova/Phonegap applications require device plugin.
```Javascript trackingService.closeSession(); ``` ```Javascript trackingService.trace('this is a trace message', data); ```It fires automatically on $stateChangeSuccess to track the user route in the application.
It fires automatically on online/offline/pause/resume events in Cordova/Phonegap applications
(requires network information plugin )
It fires automatically when an $http call respond in more time than milliseconds specified in warningAfter parameter.
Example:
$http({
method: method,
url: url ,
data : data,
timeout: 5000,
warningAfter: 2000
})
.success(function(data, status, headers, config) {})
.error(function(data, status, headers, config) {})It fires automatically when $http call doesn't respond after the time specified in **timeout** parameter.
Example: ```Javascript $http({ method: method, url: url , data : data, timeout: 5000, warningAfter: 2000 }) .success(function(data, status, headers, config) {}) .error(function(data, status, headers, config) {}) ``` #myRemoteDebuggerApp
It provides access to all the collected data. You can reach it at:
http://<path to your server>/backend/myRemoteDebuggerApp/
Features:
- Pull-to-refresh
- SESSIONS: Drag to the left the list element to get more info
- EVENTS: Tap on the list element to get more info
- Delete all the data
- Search/filter sessions and events