1.0.0 • Published 7 years ago
mondebug v1.0.0
Mondebug
Super simple module for debugging that reloads code on the Chrome Debugger on save and keeps the file running with an express server for further exploration of the code.
Installation
npm i mondebug
Usage
In any file:
On your code:
//anyfile.js
const mondebug = require('mondebug')
//your code
const something = {
hola: 'mundo'
}
const somefunc = () => {
console.log('I did something!...')
}
//call mondebug specifying port and a callback function with the code you want to execute
mondebug(3333, () => {
somefunc()
console.log('Writing `something` in the console')
global.something = something // you may use global to make your code available in the Chrome Inspector
})
On the terminal:
node --inspect anyfile.js
Or for an even better approach:
nodemon --inspect anyfile.js
1.0.0
7 years ago