Visual Studio Code | ts-node (2025)

Create a new Node.js debug configuration, add -r ts-node/register to node args and move the program to the args list (so VS Code doesn't look for outFiles).

.vscode/launch.json

json

{

"configurations": [{

"type": "node",

"request": "launch",

"name": "Launch Program",

"runtimeArgs": [

"-r",

"ts-node/register"

],

"args": [

"${workspaceFolder}/src/index.ts"

]

}],

}

.vscode/launch.json

json

{

"configurations": [{

"type": "node",

"request": "launch",

"name": "Launch Program",

"runtimeArgs": [

"-r",

"ts-node/register"

],

"args": [

"${workspaceFolder}/src/index.ts"

]

}],

}

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>" }.

Visual Studio Code | ts-node (2025)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Lakeisha Bayer VM

Last Updated:

Views: 5537

Rating: 4.9 / 5 (69 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Lakeisha Bayer VM

Birthday: 1997-10-17

Address: Suite 835 34136 Adrian Mountains, Floydton, UT 81036

Phone: +3571527672278

Job: Manufacturing Agent

Hobby: Skimboarding, Photography, Roller skating, Knife making, Paintball, Embroidery, Gunsmithing

Introduction: My name is Lakeisha Bayer VM, I am a brainy, kind, enchanting, healthy, lovely, clean, witty person who loves writing and wants to share my knowledge and understanding with you.