Skip to content

Instantly share code, notes, and snippets.

@JanMiksovsky
Created July 12, 2024 21:56
Show Gist options
  • Save JanMiksovsky/97f49c2f08f780d0949116e1986aa1a2 to your computer and use it in GitHub Desktop.
Save JanMiksovsky/97f49c2f08f780d0949116e1986aa1a2 to your computer and use it in GitHub Desktop.
VS Code launch configuration to run the "start" script when you select Start Debugging
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
// This configuration tells VS Code to launch the project via `npm start`.
"type": "node",
"request": "launch",
"name": "Launch via npm",
"cwd": "${workspaceFolder}",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "npm",
// If using nvm, uncomment the line below and specify the node version.
// "runtimeVersion": "22",
"runtimeArgs": ["--preserve-symlinks", "run-script", "start"]
}
]
}
@JanMiksovsky
Copy link
Author

Put this in your project's .vscode/launch.json file.
Note that VS Code allows line comments in .json files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment