1.0.0 • Published 12 months ago

cg-debug v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Advanced Debugging with cg

This project demonstrates how to use the cg module's AdvancedDebug class for enhanced JavaScript debugging.

Installation

npm install cg

Usage

const debug = require('cg');

const debugInstance = new debug.AdvancedDebug({
    showCodeSnippet: true,
    smartSuggestions: true,
    performanceMonitoring: true,
    autoFix: true,
    boxStyle: 'double',
    snippetContext: 3
});

async function a() {
    try {
        // your code
    } catch (error) {
        await debugInstance.display(error);
    }
}

a();

Options

showCodeSnippet: Display code snippets where the error occurred.

smartSuggestions: Provide suggestions for fixing the error.

performanceMonitoring: Monitor and display performance metrics.

autoFix: Automatically attempt to fix the error.

boxStyle: Style of the debug box (e.g., 'double').

snippetContext: Number of lines of code to display around the error.