npm.io
1.0.5 • Published 6 years ago

idebugger

Licence
MIT
Version
1.0.5
Deps
4
Size
21 kB
Vulns
0
Weekly
0

idebugger - interactive nodejs debugger in order to execute commands in imperative manner.

Quick Use

npm i idebugger
// my-script.js
const idebugger = require('idebugger');

const func = () => {
    throw Error('BOOM');
};

const main = async () => {
    let result = 10;
    try {
        result = func(); // or `async func()`, promises are supported
    } catch (e) {
        await eval(idebugger);
    }
    return result;
};

main();
node my-script.js

It runs debug code in the same context and you have access to all internal functions and variables. Enjoy!