New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

debug-engine

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debug-engine

A simple GUI based debugger for node.js applications

latest
Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

debug-engine

A simple GUI based debugger for node.js applications

Usage

At the very beginning of your script, create a new DebugEngine instance:

const DebugEngine = require('debug-engine')
const debugEngine = new DebugEngine()

And replace the console with the debugEngine console:

console = debugEngine.console

After starting your express app (if you are using express), call the onListen method:

app.listen(3000, () => {
    debugEngine.onListening()() // Yes, you need to use double ()
})

If you are using express, you also need to pipe the app into debugEngine before definig your routes and after every middleware:

debugEngine.pipe(app)

Now you can use the DebugEngine GUI. Happy debugging!

Environment

When creating a new DebugEngine instance, you can pass an environment object to the constructor, which determines if the debugger should be started automatically or not.

Automatically start debugger:

const debugEngine = new DebugEngine('development')

Don't start debugger:

const debugEngine = new DebugEngine('production')

Downlogger Integration

If you are using downlogger, and want to pipe the logs into the DebugEngine, you can simply use DownLogger.setCustomConsole(debugEngine.console):

// DebugEngine
const DebugEngine = require('debug-engine')
const debugEngine = new DebugEngine()

// Downlogger
const DownLogger = require('downlogger')
const Logger = new DownLogger()
Logger.setCustomConsole(debugEngine.console)

Keywords

debug

FAQs

Package last updated on 12 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts