---
title: "VSCode Launch Configuration for Node App"
date: 2023-05-08T11:19:34.000Z
author: Z.SHINCHVEN
tags: [vscode, node, debugging]
canonical: https://atlassc.net/2023/05/08/vscode-launch-configuration-for-node-app
---
VSCode's debugging launch configurations are saved in `./vscode/launch.json`. 

To add a launch configuration for a node app: 
1. click `Run and Debug` in the left panel.
2. click `create a launch.json file`.
3. add the following configurations for your app.

```json5
{
    // 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": [
        {
            "name": "Launch via NPM",
            "type": "node",
            "request": "launch",
            "cwd": "${workspaceRoot}",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
                "run-script", "dev" // your npm script
            ],
        }
    ]
}
```
