在 Manjaro 中使用外部终端时出现超时错误

timeout error when using external terminal in Manjaro

我已经在 Linux Manjaro 中安装了带有 Python 扩展名的 Visual Studio 代码。当我尝试启动 Python 脚本时,外部终端打开但 5 秒后我在 window 中收到一条错误消息,告诉我 "timeout" 并且我的脚本没有启动。

我发现 this post 在 Windows 10 上遇到了同样的问题,但该修复程序似乎在 Manjaro 上不起作用。有什么想法吗?

这是我的 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 (Integrated Terminal)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "integratedTerminal"
    },
    {
        "name": "Python: Remote Attach",
        "type": "python",
        "request": "attach",
        "port": 5678,
        "host": "localhost",
        "pathMappings": [
            {
                "localRoot": "${workspaceFolder}",
                "remoteRoot": "."
            }
        ]
    },
    {
        "name": "Python: Module",
        "type": "python",
        "request": "launch",
        "module": "enter-your-module-name-here",
        "console": "integratedTerminal"
    },
    {
        "name": "Python: Django",
        "type": "python",
        "request": "launch",
        "program": "${workspaceFolder}/IA_TD2.py",
        "console": "integratedTerminal",
        "args": [
            "runserver",
            "--noreload",
            "--nothreading"
        ],
        "django": true
    },
    {
        "name": "Python: Flask",
        "type": "python",
        "request": "launch",
        "module": "flask",
        "env": {
            "FLASK_APP": "app.py"
        },
        "args": [
            "run",
            "--no-debugger",
            "--no-reload"
        ],
        "jinja": true
    },
    {
        "name": "Python: Current File (External Terminal)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "externalTerminal"
    },
    {
        "name": "Python: Current File (None)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "console": "none"
    }
]

}

不幸的是,VSCode 与每个终端不兼容,它似乎(还)不与您使用 安装的 Linux Manjaro 兼容KDE 桌面环境

切换到另一个终端肯定会解决这个问题(即 GNOME 终端)。我不确定 gnome-terminal 软件包是否可以在不安装 GNOME 桌面环境 的情况下使用。

Here 是一个很好的解决方案,如何在不重新安装整个 OS 的情况下执行此操作。