How to use VS Code debugger with webpack-dev-server (breakpoints ignored)

后端 未结 4 1035
花落未央
花落未央 2021-01-31 03:03

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

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-31 03:20

    Old thread, but it still comes up in searches...

    It feels like turning on "writing the generated code to disk" might be the solution here: As per https://webpack.js.org/configuration/dev-server/#devserverwritetodisk-, add this to webpack.config.js:

    module.exports = {
      //...
      devServer: {
        writeToDisk: true
      }
    };
    

提交回复
热议问题