Reputation: 11
I'm trying to debug my react app browser against my app server in vs code. Though the browser will launch the breakpoints are unbound. The index.js file has two files.
I can with some finagling, get breakpoints to stop on the compiled code in create element form which is hard to read, but not the source JSX tag style code which would be preferred.
The index.js file compiled and uncompiled plus the launch.json
Upvotes: 0
Views: 995
Reputation: 11
The below URL gives the solution that took me two weeks to solve. I was using react webpack-dev-server, In my webpack.config.js file I put the following entry among other stuff like entry, output, modules
devtool: "source-map" // thats it!
https://trackjs.com/blog/debugging-with-sourcemaps/
Upvotes: 1