1.0.2 • Published 1 year ago

fast-debugger v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

fast-debugger

By using Fast Debugger, you can expedite the process of troubleshooting NodeJS code and resolving issues. First install Fast Debugger desktop application according your operating system. Now you are ready to receive log data from Laravel or Node projects.

download desktop application

mac. windows. linux.

installation

npm i fast-debugger --save-dev

Usage

To use Fast Debugger first require or import fast-debugger

// es module import:
import { fast, exceptionHandler } from 'fast-debugger';

// commonjs import:
const { fast, exceptionHandler } = require('fast-debugger');

To log your data

fast('FAST DEBUGGER IS WORKING');

You can specify flag to identify your specific log by chainig flag() method

fast('FAST DEBUGGER IS WORKING').flag('FLAG TO IDENTIFY');

On log data you can see file name and line number from the fast() method is called. You can open file in VSCODE by simply clicking on file name.

Note

If want to use fast() method without require or import statement. You can achieve this by global scope. Note: Be very careful with this approach

In your entry file mostly is index.js

const { fast } = require('fast-debugger');
global.fast = fast;

Exception Handler

To handle or capture Exceptions. Here we have Express.js example. Create a middleware to handle exceptions.

const { exceptionHandler } = require('fast-debugger');

module.exports = (_err, _req, _res, _next) => {
  exceptionHandler(_err);
};
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago