Microsoft/vscode
vscode node.js 디버깅
구차니
2019. 8. 8. 10:16
visual studio 하듯 하면 되네?
f9로 break point 설정하고
f5로 디버깅 모드 시작
launch.json 에서 아래와 같이 args를 추가하고 array 해주면 인자가 입력된다.
{
// 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": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}\\test.js",
"args": ["input.txt","output.txt"]
}
]
}
[링크 : https://nodejs.org/ko/docs/guides/debugging-getting-started/]
[링크 : https://nerv2000.tistory.com/105]
[링크 : https://code.visualstudio.com/docs/nodejs/nodejs-debugging]
[링크 : https://stackoverflow.com/questions/29968919/how-to-start-nodejs-with-custom-params-from-vscode]