Hi guys,
I usually install serverless in relation to my project and then i set vs code to start the serverless file in the node_modules, which seems to work up to now with any command with exception of invoke and invoke local.
in visual studio code i usually set my launch.json to something like this:
{
        "type": "node",
        "request": "launch",
        "name": "launch cryptonator aggregator",
        "program": "${workspaceRoot}/node_modules/serverless/bin/serverless",
        "cwd": "${workspaceRoot}",
        "protocol": "inspector",
        "args": [
            "invoke",
            "local",
            "-f",
            "foo-function"
    ],
}
Which results in the following command:
node --inspect-brk=49604 node_modules/serverless/bin/serverless deploy -f foo-function
Which launches and then hangs in (both terminal and vs code):  Serverless: Invoke invoke:local after calling extendedValidate() when debbuging calling
stdin().then(input => {
this.options.data = input;
resolve();
});
Which causes it to hang.
my current serverless version is 1.23.0 node v8.7.0 and v6.1.0.
Any help would be appreciated, as debbuging is always nice to have. Shall i open a github issue with it?
EDIT 3:
Wrapping the previous code around a quick hack like this seems to fix it:
const debug = typeof v8debug === ‘object’ || /–debug|–inspect/.test(process.execArgv.join(’ '));
if (debug) {
this.serverless.cli.log(‘skipping stdin pipping’);
resolve();
} else {
stdin().then(input => {
this.options.data = input;
resolve();
});
}
would there be a nicer way to fix this?