Dev*_*iya 4 python sshfs visual-studio-debugging vscode-extensions vscode-debugger
我在 Mac 上使用 VSCode 版本 1.69.1(版本详细信息在底部)。在 Mac 上,我使用SSH FS连接到远程存储库
当我在远程 python 文件上单击“运行”>“开始调试”或“运行而不调试”时,“运行和调试窗格打开”,但文件未运行 [![窗格为空][1]][ 1]
调试器适用于本地存储库(托管在 Mac 上)。
我尝试重新安装 Python 扩展,删除远程服务器上的 ~/.vscode-server,在 Mac 上重新安装 VSCode,但似乎没有任何帮助。
这是早些时候的工作(一周前尝试过),但不确定发生了什么变化。从终端(连接到远程主机,由 SSH FS 呈现),我可以运行
python test.py
并且可以工作
python 的 Launch.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",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
Run Code Online (Sandbox Code Playgroud)
Commit: b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a
Date: 2022-07-12T08:21:51.333Z (1 day ago)
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin x64 21.5.0
Run Code Online (Sandbox Code Playgroud)
Id: Kelvin.vscode-sshfs
Description: File system, terminal and task provider using SSH
Version: 1.25.0
Publisher: Kelvin Schoofs
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs```
[1]: https://i.stack.imgur.com/elruD.png
Run Code Online (Sandbox Code Playgroud)
Dev*_*iya 10
Python 调试器版本 v2022.10.0 似乎无法支持 SSH-FS。使用以前版本的 Python 扩展解决了这个问题。
要安装旧版本的扩展,请单击齿轮图标> 选择“安装另一个版本”,然后选择要安装的版本。
我使用的是 v2022.8.1 版本,可以用