小编Dev*_*iya的帖子

Python 调试无法在 SSH FS(远程主机)上运行

问题:

我在 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)

python sshfs visual-studio-debugging vscode-extensions vscode-debugger

4
推荐指数
1
解决办法
1706
查看次数