between 0 and 1

Visual Studio Code에서 Python 실행환경 (launch.json) 설정하기 본문

Software Development Engineering/Python

Visual Studio Code에서 Python 실행환경 (launch.json) 설정하기

devxpert.yoon 2019. 1. 2. 18:26
728x90
반응형

Visual Studio Code 에서 Python 을 개발하고자 할 때!


실행 혹은 디버깅 시 "Cannot launch program ~~~; setting the 'outFiles' attribute might help" 메세지가 나오며 실행되지 않을 때가 있다.


이건, launch.json 파일에서 인터프리터 (혹은 다른 언어라면 컴파일러) 설정을 해주지 않았기 때문에 발생하는 에러이다. 즉, 실행 방법을 VSCode 가 몰라서 발생하는 에러이다.


 Python의 경우, 간단히 아래 내용을 launch.json > configurations 에 추가해 주면 된다.


{
"name": "Python: Current File (integrated)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": true
},


728x90
반응형