【问题标题】:Unable to start debugging. Unexpected GDB output from the command -environment-cd "Path" . No such file or directory无法开始调试。命令 -environment-cd "Path" 的意外 GDB 输出。没有相应的文件和目录
【发布时间】:2021-10-18 16:55:41
【问题描述】:

我刚开始使用 VSCode,遇到了这个错误,尝试了一些方法来修复,但还是不行。

这是我的 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": "C/C++: Build and debug active file",
        "type": "cppdbg",
        "request": "launch",
        "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": true,
        "MIMode": "gdb",
        "miDebuggerPath": "C:\\TDM-GCC-64\\gdb64\\bin\\gdb.exe",
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            }
        ],
        "preLaunchTask": "C/C++: g++.exe build active file"
    }
]

}

【问题讨论】:

    标签: c++ visual-studio-code compiler-errors


    【解决方案1】:

    通过执行以下这些步骤解决了问题。

    转到 Windows 控制面板(您可以通过打开文件资源管理器并在路径中输入“控制面板”(不带引号)并按 Enter 来完成此操作);

    1. 在控制面板中,点击“时钟和区域”。

    2. 单击区域。将打开一个新屏幕。

    3. 在打开的屏幕中,单击“管理”并搜索“更改系统位置”按钮。

    4. 选中选项:“测试版:使用 Unicode UTF-8 支持世界语言”

    5. 重启电脑。

    代表提问者发帖

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-04
      • 1970-01-01
      相关资源
      最近更新 更多