bin/boot.js
function debug(cmd) {
        // start node in debug mode
        childProcess = childProcess || require("child_process");

        var PATH_CWD = process.cwd();

        // splice out allume command
        process.argv.splice(0, 1);

        // find debug argument
        var debugIdx = -1;
        for (var a in process.argv) {
            if (process.argv[a] == "--debug") {
                debugIdx = a;
            }
            process.argv[a] = process.argv[a].replace(/"/g, "\"");
        }
        if (debugIdx >= 0) {
            process.argv.splice(debugIdx, 1);
        }
        if (!cmd["--debug"].port) {
            process.argv.splice(0, 0, "--debug-brk");
            //process.argv.splice(0, 0, "--inspect");
        }
        else {
            if (debugIdx >= 0) {
                process.argv.splice(debugIdx, 1);
            }
            process.argv.splice(0, 0, "--debug-brk=" + cmd["--debug"].port);
            //process.argv.splice(0, 0, "--inspect=" + cmd["--debug"].port);
        }
    

        var ls = childProcess.spawn("node", process.argv, {"cwd": PATH_CWD});

        ls.stdout.on("data", function(data) {
            console.log(data.toString().trim());
        });

        ls.stderr.on("data", function(data) {
            console.error(data.toString().trim());
        });

        return;
    }
function debug(cmd) {
        // start node in debug mode
        childProcess = childProcess || require("child_process");

        var PATH_CWD = process.cwd();

        // splice out allume command
        process.argv.splice(0, 1);

        // find debug argument
        var debugIdx = -1;
        for (var a in process.argv) {
            if (process.argv[a] == "--debug") {
                debugIdx = a;
            }
            process.argv[a] = process.argv[a].replace(/"/g, "\"");
        }
        if (debugIdx >= 0) {
            process.argv.splice(debugIdx, 1);
        }
        if (!cmd["--debug"].port) {
            process.argv.splice(0, 0, "--debug-brk");
            //process.argv.splice(0, 0, "--inspect");
        }
        else {
            if (debugIdx >= 0) {
                process.argv.splice(debugIdx, 1);
            }
            process.argv.splice(0, 0, "--debug-brk=" + cmd["--debug"].port);
            //process.argv.splice(0, 0, "--inspect=" + cmd["--debug"].port);
        }
    

        var ls = childProcess.spawn("node", process.argv, {"cwd": PATH_CWD});

        ls.stdout.on("data", function(data) {
            console.log(data.toString().trim());
        });

        ls.stderr.on("data", function(data) {
            console.error(data.toString().trim());
        });

        return;
    }
function debug ( cmd ) { // start node in debug mode childProcess = childProcess || require ( "child_process" ) ; var PATH_CWD = process . cwd ( ) ; // splice out allume command process . argv . splice ( 0 , 1 ) ; // find debug argument var debugIdx = - 1 ; for ( var a in process . argv ) { if ( process . argv [ a ] == "--debug" ) { debugIdx = a ; } process . argv [ a ] = process . argv [ a ] . replace ( / " / g , "\"" ) ; } if ( debugIdx >= 0 ) { process . argv . splice ( debugIdx , 1 ) ; } if ( ! cmd [ "--debug" ] . port ) { process . argv . splice ( 0 , 0 , "--debug-brk" ) ; //process.argv.splice(0, 0, "--inspect"); } else { if ( debugIdx >= 0 ) { process . argv . splice ( debugIdx , 1 ) ; } process . argv . splice ( 0 , 0 , "--debug-brk=" + cmd [ "--debug" ] . port ) ; //process.argv.splice(0, 0, "--inspect=" + cmd["--debug"].port); } var ls = childProcess . spawn ( "node" , process . argv , { "cwd" : PATH_CWD } ) ; ls . stdout . on ( "data" , function ( data ) { console . log ( data . toString ( ) . trim ( ) ) ; } ) ; ls . stderr . on ( "data" , function ( data ) { console . error ( data . toString ( ) . trim ( ) ) ; } ) ; return ; }
CLI -> DEBUG COMMAND
CLI - > DEBUG COMMAND