Skip to content

Instantly share code, notes, and snippets.

@gparlakov
Last active February 19, 2019 12:56
Show Gist options
  • Save gparlakov/56976371169bb76663d3f02c67a5b384 to your computer and use it in GitHub Desktop.
Save gparlakov/56976371169bb76663d3f02c67a5b384 to your computer and use it in GitHub Desktop.
Debug jest current test from vs code (current - where the cursor is at)
{
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Jest for current test file",
"program": "${workspaceFolder}\\node_modules\\jest\\bin\\jest",
"//comment": "--runInBand allows the 'debugger' and breakpoints to be hit",
"//comment1": "--verbosity false due to bug where console.log is not seen on the console",
"//comment2": "${fileBaseName} will give the filename that is being edited in VS Code",
"args": ["--runInBand", "--verbose", "false", "${fileBasename}"],
"cwd": "${workspaceFolder}"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment