1. 程式人生 > >VSCode python環境執行搭建

VSCode python環境執行搭建

tasks.json

{
    "version": "0.1.0",
    "command": "python",
    "isShellCommand": true,
    "args": ["${file}"],
    "options": {
        "env": {
            "PYTHONIOENCODING": "UTF-8"
        }
    },
    "showOutput": "always"
}

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name
": "Python", "type": "python", "request": "launch", "stopOnEntry": false, "externalConsole": false, "program": "${file}", "debugOptions": [ "WaitOnAbnormalExit", "WaitOnNormalExit", "RedirectOutput"
]
} ]
}