【发布时间】:2019-04-17 13:05:30
【问题描述】:
我在调试 python 文件时打开 VS 代码集成终端时遇到问题。 VS 代码说:'$ {file} 无法解析。请打开一个编辑器。'
我正在与:https://www.youtube.com/watch?v=dNFgRUD2w68
我的启动.json
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (Integrated Terminal)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"stopOnEntry": false
}```
]
}
【问题讨论】:
-
欢迎来到 Stack Overflow。您是否打开了工作区文件夹?
-
我只打开了launch.json和settings.json...我必须打开一个工作区文件夹吗?
-
这只是这个launch.json的一部分,但我只对这个Python有问题:当前文件(集成终端)。
标签: python terminal visual-studio-code