Skip to content

Instantly share code, notes, and snippets.

@MEGApixel23
Created April 10, 2017 15:52
Show Gist options
  • Save MEGApixel23/63e45da0641ce51f935c6a39ae563587 to your computer and use it in GitHub Desktop.
Save MEGApixel23/63e45da0641ce51f935c6a39ae563587 to your computer and use it in GitHub Desktop.
PHPStorm debug for NPM packages
{
"name": "SomeName",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"local:onboard": "node $NODE_DEBUG_OPTION /usr/bin/lambda-local -f index -e _onboard_event.json -t 300",
"local:refresh": "node $NODE_DEBUG_OPTION /usr/bin/lambda-local -f index -e _refresh_event.json -t 300"
},
"license": "ISC",
"dependencies": {
"dotenv": "^4.0.0",
"firebase-admin": "^4.1.2",
"moment": "^2.18.1",
"qs": "^6.4.0",
"request": "^2.81.0"
}
}
@MEGApixel23
Copy link
Author

MEGApixel23 commented Apr 10, 2017

In case you want to Debug your node app which is run by NPM add to your package.json commands:
node $NODE_DEBUG_OPTION *npmpackage* *params*

For example:
if you run command in console:
/usr/bin/lambda-local -f index -e _onboard_event.json -t 300

the command in package.json would be:
node $NODE_DEBUG_OPTION /usr/bin/lambda-local -f index -e _onboard_event.json -t 300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment