0

Ich habe seit ein paar Jahren VS-Code benutze und ich finde es eine wirklich gute IDE. Ich programmiere mehr als jede andere Sprache in Python.Einstellung Python-Pfad in VS-Code für launch.json

Es stört mich wirklich, dass ich nicht um hast die IDE-Debugger zu verwenden (auch wenn es ein Merkmal ist).

Fehler beim Drücken von Debug-Play-Taste:

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

Überprüfung meiner PYTHONPATH: enter image description here

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

Irgendwelche Ideen/Anregungen?

Antwort

0

Wenn Sie sich auf einem * nix-System befinden, starten Sie das Terminal und geben which python ein, um den Python-Pfad abzurufen, kopieren Sie ihn und fügen Sie ihn als Wert pythonPath in die Datei launch.json ein.

+0

ich das versucht, tut das Gleiche –

+0

'' ' "Konfigurationen" @rubayeet: [ { "name": "Python", "type": "Python", "Anforderung": "Start" , "stopOnEntry": true, "pythonPath": "/Library/Frameworks/Python.framework/Versions/2.7/bin/python", "programm": "$ {file}", "cwd": "/Arbeitsbereich/h5-Automation /“, "env": {}, "envFile": "$ {workspaceRoot}/env", "Debugoptions."[ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput" ] }, '' ' –

Verwandte Themen