I am working on a Node.js project in Visual Studio Code. I noticed that when you open the package.json
file, there's a debug button above the scripts
property. When clicked, it allows me to select and run one of the script settings, which I find very convenient.
Given this feature, I expected there to be an option to add one of these scripts directly to .vscode/launch.json
. When I open the launch.json
file, there's an add button and I've tried using "node.js: npm" there. It's useful, but I still have to manually enter one of the script values. Plus, if the .vscode/launch.json
file doesn't exist, I have to create it manually. While these are simple tasks, I'm doing them manually each time.
I'm starting to wonder if I'm just missing an easier way to do this. Is there a feature or an extension in VSCode that allows adding npm scripts directly to the launch.json
file via the UI? If not, are there any recommended workflows or tools to simplify this process?