- Set up your
.vscode/launch.json
file with the code given above. Note that the code is approximate - your project's might differ. - Run your development server - in my case, with Webpack Dev Server, via a npm script such as
npm start
. - Set a breakpoint in your main JS/JSX module.
- Switch to the Run & Debug in VSCode - usually second option of the VS Code left side bar.
- Run the
Debug in Chrome Canary
task.
- https://code.visualstudio.com/docs/nodejs/debugging-recipes
- https://medium.com/@auchenberg/live-edit-and-debug-your-react-apps-directly-from-vs-code-without-leaving-the-editor-3da489ed905f
- https://gist.github.com/jarshwah/389f93f2282a165563990ed60f2b6d6c
- https://webpack.js.org/configuration/output/#outputdevtoolmodulefilenametemplate