docs/general/debugging.md
You can super charge your React debugging workflow via VS Code and Chrome. Here are the steps:
Launch Chrome option to your launch.json config:{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/app",
"sourceMapPathOverrides": {
"webpack:///./app/*": "${webRoot}/*",
"webpack:///app/*": "${webRoot}/*"
}
}
]
}
npm run start.Launch Chrome configuration.You can then set breakpoints directly from inside VS Code, use stepping with the Chrome or VS Code buttons and more.
Read all about it in the Debugger for Chrome page.
Note: There's currently a known problem with source maps and VS Code. You can change your Webpack dev config to use inline-source-map instead of eval-source-map and the issue should be resolved.
WebStorm is a powerful IDE, and why not also use it as debugger tool? Here are the steps:
source-map (This line)npm run start)JavaScript Debugroot directory with webpack://. (please note the last dot)build directory with your root path (e.g. http://localhost:3000). (dot) in webpack://.ESLint helps developers on a team follow the same coding format. It's highly recommended to set it up in your IDE to avoid failing the linting step in tests.
ESLintEnable