I'm trying to setup my debug environment on VS Code to run and debug a MERN app.
I currently have this launch.json:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Node: Nodemon",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"dev"
],
"outputCapture": "std",
},
]
}
It's working just fine, but with it I can only have breakpoints in the backend and not in the React app on the frontend.
The script yarn dev (package.json in the backend) runs both backend and frontend with concurrently:
Here's my scripts in package.json in the backend:
"scripts": {
"start": "node backend/server.js",
"server": "nodemon backend/server.js",
"client": "yarn --cwd frontend/ start",
"dev": "concurrently \"yarn server\" \"yarn client\""
}
What would be a working launch.json that would allow me to have breakpoints in the frontend as well?