VS Code: “Breakpoint ignored because generated code not found” error

前端 未结 18 2640
无人共我
无人共我 2020-12-13 08:07

I have looked everywhere and I still have issue debugging TypeScript inside VS Code. I have read this thread but still I am not able to hit my breakpoints placed inside a Ty

18条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 08:49

    I think the problem might be in your 'program' section of launch.json. Try it like this:

    {
        // Name of configuration; appears in the launch configuration drop down menu.
        "name": "Launch",
        // Type of configuration.
        "type": "node",
        "request": "launch",
        // Workspace relative or absolute path to the program.
        "program": "${workspaceRoot}/app.ts",
        // Automatically stop program after launch.
        "stopOnEntry": false,
        // Command line arguments passed to the program.
        "args": [],
        // Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.
        "cwd": "${workspaceRoot}",
        // Workspace relative or absolute path to the runtime executable to be used. Default is the runtime executable on the PATH.
        "runtimeExecutable": null,
        // Optional arguments passed to the runtime executable.
        "runtimeArgs": ["--nolazy"],
        // Environment variables passed to the program.
        "env": {
            "NODE_ENV": "development"
        },
        // Use JavaScript source maps (if they exist).
        "sourceMaps": true,
        // If JavaScript source maps are enabled, the generated code is expected in this directory.
        "outDir": "${workspaceRoot}"
    }
    

提交回复
热议问题