My problem is simple.
I just want to make VS Code\'s debugger work with webpack-dev-server without ignoring my breakpoints.
Now, webpack-dev-server serves the bund
For Webpack 4:
Install webpack-cli
locally if you don't already have it installed (it has been pulled out of webpack
).
Add the following VSCode debug configuration to your .vscode/launch.json
(that's the file that VSCode opens when you click on the wheel icon in Debug view):
{
"type": "node",
"request": "launch",
"name": "build",
"program": "${workspaceFolder}/node_modules/.bin/webpack-cli",
"args": [
"--config",
"webpack.config.prod.js"
],
"autoAttachChildProcesses": true,
"stopOnEntry": true
}
stopOnEntry
will make debugger stop in the very first (shebang) line of webpack.js
, like this: