0

私はVSコードを数年間使用しており、本当に良いIDEだとわかります。私は他のどの言語よりもPythonでプログラミングしています。launch.jsonのVSコードでのPythonパスの設定

IDEのデバッガを使用することに慣れていないというのは本当に気になります(それは機能ですが)。

エラーデバッグ再生ボタン押す:私PYTHONPATHをチェック

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

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" 
     ] 
    } 

任意のアイデア/提案を?

答えて

0

* nixシステムを使用している場合は、端末を起動し、which pythonと入力してPythonパスをコピーし、それをコピーしてpythonPathという値でlaunch.jsonファイルに貼り付けます。

+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" ] }、 '' ' –

関連する問題