天天看點

VSCode插件 code runner執行PHP,JavaScript,Python

文檔: https://github.com/formulahendry/vscode-code-runner 常用設定

// 運作之前儲存檔案
"code-runner.saveFileBeforeRun": true,

// 清空控制台
"code-runner.clearPreviousOutput": true,

// 指定Python解釋器
"code-runner.executorMap": {
  "python": "/Users/.pyenv/versions/py370/bin/python3",
},      

快捷鍵

運作快捷鍵改為: control + r

用以下檔案測試都可以順利執行

demo.js

console.log("hello world");      

demo.py

print("hello world");      

demo.php

<?php
echo "hello world";