Open maxime-aubry opened 9 months ago
@maxime-aubry
This will create a launch.json file in a new .vscode folder in your project which includes a configuration to launch the website. Your launch.json should look like this:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}
I see you are using env-cmd package which sets environmental variables such as PORT, the one is located in your launch.json file at "url" option — 8080. Your launch.json's url's port must be the same as the port your app is running at because a Chrome instance is attached to an already running app.
Now you only have to run your app. Follow these steps:
Compiled successfully!
You can now view my-app in the browser.
Local: http://localhost:3000
3. Press F5 or go to the Run and Debug view and then press green play button that says "Launch Chrome against localhost".
Hello.
I would like to debug my react app into VSCode and Chrome. Everything i tried has failed.
Here is my command line into package.json :
Could you help me please ? Thanks.