Skip to content

Instantly share code, notes, and snippets.

@riddla
Last active May 23, 2021 07:20
Show Gist options
  • Save riddla/8830e0485dd0a48533c8fb05da2df09d to your computer and use it in GitHub Desktop.
Save riddla/8830e0485dd0a48533c8fb05da2df09d to your computer and use it in GitHub Desktop.
Debug ES6 React using Jest with Visual Studio Code (VSCode)
{
"presets": [
"react",
"es2015"
],
"sourceMaps": "inline",
"retainLines": true
}
{
"version": "0.2.0",
"configurations": [{
"type": "node",
"request": "launch",
"name": "Launch Jest",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"cwd": "${workspaceRoot}",
"args": ["--runInBand"],
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"sourceMaps": true
}]
}
{
"devDependencies": {
"babel-jest": "^18.0.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.22.0",
"babel-register": "^6.22.0",
}
}
@gibbok
Copy link

gibbok commented Sep 13, 2017

@Vikaskumargd thanks it works great on the latest VS.

@codialsoftware
Copy link

@Vikaskumargd this works only if you add port: 9229, at least for me on insiders build

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