"configurations": [
        {
            "name": "Python Debugger: Current File",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "cwd": "${fileDirname}",    // 현재 열려있는 파일 기준으로 실행.
            "env": {
                "PYTHONPATH": "${workspaceFolder}"  // 루트 디렉터리를 환경변수에 추가.
            }
        }
    ]

 

"cwd": "${fileDirname}"

"env": {

        "PYTHONPATH": "${workspaceFolder}"

}

 

cwd: 현재 파일 기준으로 실행

env: Python 환경변수 추가

'Code > Python' 카테고리의 다른 글

ERROR) ImportError: DLL load failed while importing _rust  (0) 2024.06.25
json 파일 줄 맞춰 정리하기  (0) 2022.04.26
rec to image  (0) 2022.04.07
Selenium으로 Chorme 크롤링 & 저장  (0) 2022.03.31
Python에서 Void Pointer 사용하기  (0) 2022.03.22

+ Recent posts