- vscode 우측의 디버거 아이콘을 클릭한다.

- launch.json 파일 만들기 를 클릭한다.

- 현재 Node.js 기반의 프로젝트를 작성하고 있기때문에 Node.js를 클릭한다.

- .vscode 폴더에 생성된 launch.json 파일을 실행한다.

- 아래 이미지와 같이 필요없는 내용은 지워준다.

- runtime으로 npm을 사용한다면 아래와 같이 configurations를 수정한다.
{
// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
// 기존 특성에 대한 설명을 보려면 가리킵니다.
// 자세한 내용을 보려면 <https://go.microsoft.com/fwlink/?linkid=830387을(를)> 방문하세요.
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug NestJS",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"start:debug"
],
"console": "integratedTerminal",
"restart": true,
"port": 9229,
"autoAttachChildProcesses": true,
"cwd": "${workspaceFolder}/실행할 프로젝트 경로"
}
]
}