Add launch.json into the .vscode folder.
Now, enter the Debug view. Either add debugger into one of the tests or add breakpoints, before you execute one of the scripts.
Done :)
Add launch.json into the .vscode folder.
Now, enter the Debug view. Either add debugger into one of the tests or add breakpoints, before you execute one of the scripts.
Done :)
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Debug CRA Tests", | |
| "type": "node", | |
| "request": "launch", | |
| "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts", | |
| "args": ["test", "--runInBand", "--no-cache", "--watchAll=false"], | |
| "cwd": "${workspaceRoot}", | |
| "protocol": "inspector", | |
| "console": "integratedTerminal", | |
| "internalConsoleOptions": "neverOpen", | |
| "env": { "CI": "true" }, | |
| "disableOptimisticBPs": true | |
| }, | |
| { | |
| "name": "Debug CRA Current File", | |
| "type": "node", | |
| "request": "launch", | |
| "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts", | |
| "args": [ | |
| "test", | |
| "--runInBand", | |
| "--no-cache", | |
| "--watchAll=false", | |
| "${fileBasenameNoExtension}" | |
| ], | |
| "cwd": "${workspaceRoot}", | |
| "protocol": "inspector", | |
| "console": "integratedTerminal", | |
| "internalConsoleOptions": "neverOpen", | |
| "env": { "CI": "true" }, | |
| "disableOptimisticBPs": true | |
| } | |
| ] | |
| } |