刚刚开始学习SICP(计算机程序的结构和解释)。我安装了 mit-scheme 编译器。我只需在终端中输入 schema 即可运行解释器。我还安装了 VSCode 以及对方案的 linting 支持。
现在我需要从 VSCode 编写、编译并启动方案程序。我该怎么做。我不需要逐行调试。我是 VS 代码新手。
PS:我可以编写程序,编辑它并检查 lint 错误。我无法开箱即用地启动方案编译器。我缺少一些编辑 json 来完成此操作的步骤。
PS PS:我更喜欢 VSCode,我希望 mit-scheme 来解释/编译我的程序。不想使用 Racket 或代码运行器扩展。谢谢!
最佳答案
- 主菜单->终端->配置任务
- 创建新任务:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "run scheme",
"type": "shell",
"command": "scheme",
"args": ["<", "${file}"]
}
]
}
- 使用方案代码打开文件
- 主菜单->终端->运行任务->运行方案
关于visual-studio-code - 如何在VS Code中运行scheme程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62501529/