Skip to content

Instantly share code, notes, and snippets.

@oonsamyi
Created September 21, 2019 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oonsamyi/816d129d113b7eedcb81cfe454fa9161 to your computer and use it in GitHub Desktop.
Save oonsamyi/816d129d113b7eedcb81cfe454fa9161 to your computer and use it in GitHub Desktop.
DEBUG JS: Chrome (public / incoginto), Firefox, Jest (all tests / current test)
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
// Uncomment this flag if need to set debugger points when chrome already is launched (experimental feature)
// "breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
},
// remove this flag if chrome already is launched
"userDataDir": false,
"skipFiles": ["node_modules/**"],
},
{
"type": "chrome",
"request": "launch",
"name": "chrome incoginto",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
// Uncomment this flag if need to set debugger points when chrome already is launched (experimental feature)
// "breakOnLoad": true,
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
},
// remove this flag if chrome already is launched
"userDataDir": false,
"skipFiles": ["node_modules/**"],
"runtimeArgs": ["--incognito"]
},
{
"type": "firefox",
"request": "launch",
"name": "firefox",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"pathMappings": [{ "url": "webpack:///src/", "path": "${webRoot}/" }]
},
{
"type": "node",
"request": "launch",
"name": "jest",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
},
{
"type": "node",
"request": "launch",
"name": "jest file",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"jest.config.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment