Mobile debug toolkit, include console.log, HTML Inspector and script inject api.
npm install jsinspector -gjsinspector serverThe server's port default to 9000, open Dashboard page in browser:
http://localhost:9000Note: use
jsinspector server --port PORTto start server with specified port.
- Console from Remote
Support console of log, clear, error, info, warn, time and timeEnd:
console.log(window); // -> {xxx: 'String', xxx2: 'Function', ..., window: 'Global'}
console.log(document); // -> {xxx: 'String', xxx2: 'Function', ..., body: 'HTMLBodyElement'}- Execute Script
Using inject method to execute script in remote browser:
inject('console.log("window")')
// block codes
inject(function () {
console.log(document)
})
// insert external script
inject.js('http://yourhost/lib.js')
// insert external style sheet
inject.css('http://yourhost/style.css')The MIT License (MIT)
Copyright (c) 2014 guankaishe
