Just run webpack.jsin debug mode using nodejs. You can run the following on your terminal (if you are already in the directory with your node_modules present):
node --inspect node_modules/webpack/bin/webpack.js --colors
I also found that the VSCode debugger is very intuitive to debug when I was developing my own webpack loader. If you are using VS Code, you can have the launch.jsonfollowing configuration:
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 5858
}
node :
node --inspect-brk=5858 node_modules/webpack/bin/webpack.js --colors
, , , .