Skip to content

Instantly share code, notes, and snippets.

@KaioGomesx
Last active November 30, 2019 16:23
Show Gist options
  • Select an option

  • Save KaioGomesx/14981f6315d4a7359d37a32f70b624c4 to your computer and use it in GitHub Desktop.

Select an option

Save KaioGomesx/14981f6315d4a7359d37a32f70b624c4 to your computer and use it in GitHub Desktop.
Debbug vscode with Babel
{
"presets": ["@babel/env"],
"plugins": ["@babel/proposal-class-properties"]
}
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach",
"restart": true,
"port": 9229
},
{
"type": "node",
"request": "launch",
"protocol": "inspector",
"name": "ES6 Debugger",
"program": "${workspaceFolder}/src/index.js",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node",
"runtimeArgs": ["--presets", "@babel/env"]
}
]
}
** install:
"@babel/core": "^7.7.4",
"@babel/node": "^7.7.4",
"@babel/plugin-proposal-class-properties": "^7.7.4", '' if you use POO in your project
"@babel/preset-env": "^7.7.4",
"scripts": {
"start": "babel-node src/index.js",
"debug": "babel-node debug index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment