I have express backend and react js on front end. I want to debug react code with visual studio code and im getting grayed out breakpoint with message "Breakpoint ignored because generated code not found (source map problem?)".
My bundled file and source map file is located in public folder. In chrome my project structure looks like this
I have installed debugger for chrome extension for visual studio code. My launch.json configuration is
{
"version": "0.1.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"sourceMaps": true,
"webRoot": "${workspaceRoot}/public",
"trace": true
},
{
"name": "Launch index.html (disable sourcemaps)",
"type": "chrome",
"request": "launch",
"sourceMaps": false,
"file": "${workspaceFolder}/index.html"
},
]
}
Webpack configuration:
module.exports = {
mode: "development",
entry: {
app: "./public/javascripts/app.jsx"
},
devtool: "source-map",
output: {
devtoolLineToLine: true,
path: __dirname + "/public",
pathinfo: true,
sourceMapFilename: "./app.js.map",
filename: "[name].js"
},
module: {
rules: [
{
test: /\.jsx$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: "babel-loader",
options: {
presets: ["react"]
}
}
}
]
},
watch: true
};
And this is my project structure:
Please explain to me what am i doing wrong. Any help is well appreciated!


/publicfrom your webRoot? And, can you include the output of the.scriptscommand in your question?