Debugging current file in VS Code
For reference this is the full launch.json
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Debug File", "program": "${file}" } ]}
For a single file, you can skip the launch.json file entirely. Just click the green arrow in the debugger panel and choose Node as your environment.
From here.