mondebug

1.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i mondebug

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

1.96 kB

Total Files

4

Last publish

Collaborators

  • diegovdc