- Installing ts-node and typescript locally √
- Add a launch.json file √
{
"name": "Current TS Tests File",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": ["-r", "ts-node/register", "${relativeFile}"],
"cwd": "${workspaceRoot}",
"protocol": "inspector"
}
Open up index.ts
, and start the debugger...
Process exited with code 1
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"