React – VS Code
https://dev.to/zirkelc/debug-a-react-app-in-vscode-21ga
In the launch.json of VS Code, add following : (The first one launches a new tab, The second one attaches to an open url in chrome , but only if chrome was launched with the debugging flag: C:\Program Files (x86)\Google\Chrome\Application\chrome.exe –remote-debugging-port=9222 — “%1” (or with a custom debug chrome app)
{
"name": "Launch Chrome",
"request": "launch",
"type": "pwa-chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
},
{
"name": "Attach to Chrome",
"port": 9222,
"request": "attach",
"type": "pwa-chrome",
"urlFilter": "http://localhost:3000/*", // use urlFilter instead of url!
"webRoot": "${workspaceFolder}"
}
NestJs – VS Code
In the launch.json of VS Code , add following: (This attaches the debugger to a running nest application, but only if the nest application was started with nest start –debug –watch
{
"type": "node",
"request": "attach",
"name": "Attach To Nest (Run start:debug)",
"port": 9229,
"restart": true
},
Be First to Comment