Skip to content

matteo-tonini/myRemoteDebugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myRemoteDebugger

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

Client

In your index.html: ```HTML <script src="MyRemoteDebugger.js"></script> ```

Inject module in your application:

angular.module('app', ['MyRemoteDebugger'])

Server

First **upload /backend folder** to your server, then: ```SQL CREATE DATABASE my_myremotedebugger; ``` Open in a browser: ``` http:///backend/myRemoteDebuggerApp/ ```

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

Init Session

```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.

Close Session

```Javascript trackingService.closeSession(); ```

Trace

```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 )

Info

```Javascript trackingService.info('this is an info message'); ```

Debug

```Javascript trackingService.debug('this useful to debug data', data); ```

Warn

```Javascript trackingService.warn('this is a warning message', data); ```

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) {})

Error

```Javascript trackingService.error('this is an error message', data); ```

Exception

```Javascript trackingService.exception('this is an exception message', data); ``` It fires automatically when **$exceptionHandler** caught an exception in Javascript code.
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

About

debugger module for AngularJS (Integrated with Cordova/Phonegap)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •