launch.json

    [파이썬]VSCODE 작업 디렉토리 설정 [파일 저장 위치 현위치로 변경]

    Ctrl + P 를 눌러 launch.json 파일을 찾는다 Python 구성에 "cwd": "${fileDirname}" 을 추가해준다 { "version": "0.2.0", "configurations": [ { "name": "Python: Current File (Integrated Terminal)", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "cwd": "${fileDirname}" // "Current File" }, ] } 파일 위치 변경시 아래 코드를 추가하여 해결할수도있다 import sys import os.path as op with open(op.join(..