Skip to content

How to launch app into launch.json #368

Description

@maxime-aubry

Hello.

I try to launch my React app using by launch.json for debugging into chrome

Here is the command line into package.json file :

"scripts": {
    "start": "env-cmd -f .env.a-env react-app-rewired start",
},

if i try to use any configuration into launch.json, environment variables are not read.

I tried this :

{
        "type": "node",
        "request": "launch",
        "name": "Launch with Node",
        "program": "${workspaceFolder}",
        "cwd": "${workspaceFolder}",
        "envFile": "${workspaceFolder}/.env.a-env",
}

And this too :

{
            "name": "Launch via npm",
            "type": "node",
            "request": "launch",
            "cwd": "${workspaceFolder}",
            "runtimeExecutable": "npm",
            "runtimeArgs": ["run-script", "start"]
}

And many other configurations.

Can you help me please ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions