Debugging using VSCode

Hi. Is anybody using the VS Code debugger using dev:inspect for server side debugging? I can attach to the running debug port but won’t be able to set breakpoints in my source code – they are all denied by: Breakpoint ignored because generated code not found (source map problem?)..
SourceMaps are enabled in the Webpack config and are working in the browser (triggered via DevTools, not VSCode) – is this a problem with the webpack-dev-middleware ? Any experiences?

If I switch to inline-source-maps and define a content-base for the dev-server in core/build/webpack.base.config.ts it worked:

devtool: 'inline-source-map',
devServer: {
  contentBase: '../../dist'
},

This way I can attach the running debug port and set breakpoints.

The Problem seems to be that the webpack-dev-server or middleware prefixes the files with webpack:///. VSCode is not able to handle this inside it’s debugger so it can’t find any source-map related code.

I found a good overall explanation here: https://stackoverflow.com/a/57220717

Maybe somebody has a working launch.json to share?

Here is my, quiet crude, launch.json which I’m using with the changes above:

{
  "configurations": [
    {
      "name": "Attach to VSF server",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "cwd": "${workspaceFolder}",
      "trace": true,
      "sourceMaps": true
    }
  ]
}