0

나는 VS 코드를 몇 년 동안 사용해 왔지만 정말 좋은 IDE라는 것을 알게되었습니다. 나는 다른 어떤 언어보다도 파이썬으로 프로그래밍한다.launch.json 용 VS 코드의 파이썬 경로 설정

IDE의 디버거를 사용하는 데별로 신경 쓰지 않아서 정말 괴롭습니다.

오류 눌러 디버그 재생 버튼 : enter image description here

내 launch.json

"configurations": [ 
    { 
     "name": "Python", 
     "type": "python", 
     "request": "launch", 
     "stopOnEntry": true, 
     "pythonPath": "${config:python.pythonPath}", 
     "program": "${file}", 
     "cwd": "/workspace/h5-automation/", 
     "env": {}, 
     "envFile": "${workspaceRoot}/.env", 
     "debugOptions": [ 
      "WaitOnAbnormalExit", 
      "WaitOnNormalExit", 
      "RedirectOutput" 
     ] 
    } 

모든 아이디어/제안 :

Failed to launch the Python Process, please validate the path 'export PATH=$PATH:/Library/Frameworks/Python.framework/Versions/2.7/bin/python' 

enter image description here

내 PYTHONPATH를 확인?

답변

0

* nix 시스템을 사용하는 경우 터미널을 실행하고 which python을 입력하여 Python 경로를 가져온 다음 복사하여 launch.json 파일에 pythonPath 값으로 붙여 넣으십시오. [ { "이름": "파이썬" "유형": "파이썬" "요청": "시작"

+0

나는이 시도 같은 일이 –

+0

''' "구성"@rubayeet 않습니다 , "stopOnEntry": true, "pythonPath": "/Library/Frameworks/Python.framework/Versions/2.7/bin/python", "program": "$ {file}", "cwd": "/작업/H5 자동화/", "ENV ": {}, "envFile ":"$ {workspaceRoot}/ENV " "debugOptions. "[ "WaitOnAbnormalExit " "WaitOnNormalExit " "RedirectOutput" ] },''' –