git clone https://github.com/JQSC/debug-react-source-code.gityarnreact v17.0.2安装插件 Debugger for Chrome
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:3000", // 改为目标 url
"webRoot": "${workspaceFolder}",
}
]
}|-- src
|-- react # 仓库源代码直接拿过来的
|-- index.js