Try   HackMD

How to make vscode run .sage files with sage command in terminal and with python syntax
Best solution for code runner extention in visual studio code (vscode).

  1. add "*.sage" "python" key value in file association.
  2. Set executorMap python to null "python": null
  3. Assign 2 key value pair in executorMapByFileExtension ".py" : "python3 -u", ".sage": "cd $dir && sage $fileName"

#inspired by this thread https://github.com/formulahendry/vscode-code-runner/issues/329#issuecomment-409806108