c++ - 我无法在 Visual Studio 代码中使用“开始调试”选项
问题描述
我是编码领域的菜鸟,这是我第一次希望尝试正确地对堆栈溢出提出问题。
它总是要求配置 launch.json 但添加任何配置并没有解决我的问题。我的 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": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "enter program name, for example ${workspaceFolder}/a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]``
}
]}
每当直接从 launch.json 构建它时,我都会收到此消息错误:-
"launch:program 'enter program name, for example /home/prabhav/Documents/a.out' does not exist.
解决方案
推荐阅读
- c++ - 围绕 SetThreadErrorMode()、SetErrorMode()、_set_error_mode() 和 _CrtSetReportMode() 感到困惑
- python-3.x - 使用 Tkinter 和 Python 3 访问 LabelFrames 中的子项
- arangodb - 使用 ArangoDB 的 AQL 生成随机字符串?
- azure - 如何在 Azure 上自定义 VM
- mysql - Slow MySQL distinct with where
- javascript - 动态更改标记图像源
- php - yii2 购物车ajax
- c++ - 如何在 C++ 类中对数据结构进行分类
- c++ - 这是删除整个链表的有效方法吗?
- java - 如何在 JAVA 中为帐户确认邮件创建 Web 令牌