Use a launch config to start your program, or attach to a process launched outside of VS Code.
Use the JavaScript debug terminal, similar to using the integrated terminal.
Use auto attach to debug processes you run in VS Code's integrated terminal.
There are a few ways you can debug your Node.js programs in VS Code: Setting up a project for Node.js debugging is straightforward with VS Code providing appropriate launch configuration defaults and snippets. The Visual Studio Code editor has built-in debugging support for the Node.js runtime and can debug JavaScript, TypeScript, and many other languages that are transpiled into JavaScript.