Clone the React source code and run ityarn
Download the dependent
Configuration. The vscode/launch. Json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0"."configurations": [{"type": "node"."name": "vscode-jest-tests"."request": "launch"."program": "${workspaceFolder}/node_modules/jest/bin/jest"."args": [
"${file}"."--config"."./scripts/jest/config.source.js"."--runInBand"]."cwd": "${workspaceFolder}"."console": "integratedTerminal"."internalConsoleOptions": "neverOpen"."disableOptimisticBPs": true."env": {
"NODE_ENV": "development"}}}]Copy the code
Install the vSocde Flow Language Support plug-in and set flow.vscode /settings.json
{
"javascript.validate.enable": false."flow.pathToFlow": "${workspaceRoot}/node_modules/.bin/flow"
}
Copy the code
Install vscode jest plug-in, modify jest/preprocessor.js source code
Add the sourceMaps: ‘both’ field to the babelOptions object