microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.31k stars 2.77k forks source link

Debug on WSL with VSC #124

Open jin-chong opened 6 years ago

jin-chong commented 6 years ago

Hi,

I try to debug this example with VSC, and I'm running this on WSL (Ubuntu). OS: Windows 10 Debug tool: VSC 1.25 WSL: Ubuntu 18.04

My VSC configuration is : ` { "version": "0.2.0", "configurations": [

    {
        "type": "node",
        "request": "launch",
        "name": "Launch via NPM",
        "runtimeExecutable": "npm",
        "runtimeArgs": [
            "run-script",
            "debug"
        ],
        "port": 9229,
        "useWSL": true,
        "console": "externalTerminal",
        "timeout": 100000,
        "restart": true,
        "sourceMaps": true
    },
    {
        "type": "node",
        "request": "attach",
        "name": "Attach by Process ID",
        "processId": "${command:PickProcess}",
        "protocol": "inspector"
    }
]

} ` When I press F5, it does not stop at Debug breakpoints and saying "benerated code not found". But when I look at dist folder, it has *.map files.

Could you please help me to figure it out? Thanks in advance!