am trying to learn typescript and looking for some help with setting up debugger support in VS code. Here is my sample TS app which is a standalone app just prints "Hello World" text in console on data entered in console. How do i provide console input after the application is launched? I place a break point in console.log at line 6, the execution stops there when launched. But I want to enter runtime console input and inspect the console.log at line 4.
Index.ts:
class Startup {
public static main(): number {
process.stdin.on("data",(buffer) => {
console.log("Hello World);
});
console.log("Test breakpoint");
return 0;
}
}
Startup.main();
Launch.json {
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"preLaunchTask": "tsc: build - src/tsconfig.json",
"program": "${workspaceFolder}/src/index.ts",
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
}
]
}