Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Run ts-node in VSCode Debugger
{
"version": "0.2.0",
"configurations": [
{
"name": "Node Inspector",
"type": "node",
"request": "launch",
"args": ["${workspaceRoot}/src/service.ts"],
"runtimeArgs": ["-r", "ts-node/register"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart",
"env": {
"TS_NODE_IGNORE": "false"
}
}
]
}
@WhatIsHeDoing

This comment has been minimized.

Copy link

WhatIsHeDoing commented May 8, 2019

Just what I needed, thank you!

@natarajanmca11

This comment has been minimized.

Copy link

natarajanmca11 commented Oct 17, 2019

how to pass the parameters to the service.ts file

@phobos101

This comment has been minimized.

Copy link

phobos101 commented Oct 28, 2019

https://github.com/TypeStrong/ts-node#visual-studio-code

Note: If you are using the --project <tsconfig.json> command line argument as per the Configuration Options, and want to apply this same behavior when launching in VS Code, add an "env" key into the launch configuration: "env": { "TS_NODE_PROJECT": "<tsconfig.json>" }.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.