How do you get the Code Runner extension in Visual

2020-07-30 02:01发布

I'd like quickly run the active python file in vscode using the Code Runner extension.

When I run it I get the message...

Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640

I would like Code Runner to use the active vscdode Python Interpreter. How?

1条回答
再贱就再见
2楼-- · 2020-07-30 02:56

This took some time to find so I thought I'd post the Q & A here for future searchers.

From this github post.

Open your settings.json file and add this setting.

"code-runner.executorMap": {
  "python":"$pythonPath $fullFileName",
}

查看更多
登录 后发表回答