c++ - 无法开始调试。命令 -environment-cd "Path" 的意外 GDB 输出。没有这样的文件或目录
问题描述
我刚开始使用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"
}
]
解决方案
通过执行以下这些步骤解决了问题。
转到 Windows 控制面板(您可以通过打开文件资源管理器并在路径中输入“控制面板”(不带引号)并按 Enter 来执行此操作);
在控制面板中,单击“时钟和区域”。
单击区域。将打开一个新屏幕。
在打开的屏幕中,单击“管理”并搜索“更改系统位置”按钮。
检查选项:“测试版:使用 Unicode UTF-8 支持世界语言”
重新启动计算机。
代表提问者发布
推荐阅读
- asp.net-core - 开迪克特。将自定义声明保存到 AspNetUserClaims 表
- performance - 在 DynamoDB 中查询最新项目和正确使用分区键
- apache - 限制对虚拟主机的访问
- r - 如何在 R 中为图形排序观察结果?
- networking - 如何在不部署代理的情况下从云端收集事件日志?
- python - 在 csv/df 中选择具有不同标题的特定列 python
- javascript - 三.js 从 ObjLoader 操作一个对象
- c++ - 如何避免包含文件由于模板类而传播
- .net - 上传 SSRS 报告会导致数据源需要凭据
- oracle - 返回当月的记录 + 6