Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode python task #5

Open
amandaXCY opened this issue Dec 22, 2017 · 0 comments
Open

vscode python task #5

amandaXCY opened this issue Dec 22, 2017 · 0 comments

Comments

@amandaXCY
Copy link
Owner

amandaXCY commented Dec 22, 2017

vscode中使用任务运行python,

  • 修改.vscode/task.json
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [{
        "taskName": "Run Python",
        "group": {
            "kind": "build",
            "isDefault": true
        },
        "command": "${config:python.pythonPath}",
        "type": "shell",
        "args": [
            "${file}"
        ],
        "presentation": {
            "reveal": "always",
            "panel": "new"
        },
        "problemMatcher": {
            "fileLocation": "absolute",
            "pattern": [{
                "regexp": "^\\s+File \"(.*?)\", line ([0-9]+)[,]?.+?$",
                "line": 2,
                "file": 1,
                "message": 0
            }, {
                "regexp": "^\\s+(.+?)$",
                "code": 1
            }]
        }
    }]
}
  • 然后使用comd + shift + b运行
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant