I am using the babel-webpack-4 example config with sourcemaps.
The package.json debug script looks like this:
node --inspect-brk ./node_modules/.bin/serverless offline start
With this, chrome debugger breaks at the correct place, I can see the correct source file name in the open tab, the call stack looks good but the source file is empty. I can open all source files in the left "Network" pane, but they are all empty.
Is this expected to work?
I've confirmed that the same config can be debugged just fine with VSCode.
Also, I've confirmed that chrome debugging works as expected without source map support.
Thanks!
Hi @bebbi . I'm using only VSCode where it works perfectly. But I remember that VSCode only started to work after I had set the outFiles correctly to the .webpack folder in the launch.json (see the file in the babel webpback 4 example).
I assume that for Chrome also some option has to be set, so that it uses the .webpack folder as root for resolution of the references in the source maps. Otherwise Chrome might try to reference the original source code which, of course is not available in the process space. However, I have no specific experience for that case with Chrome.
Thanks! Am going to check this out or otherwise use VSCode.
Actually, simply changing the webpack config
nosources-source-map -> eval-source-map
did the job..