vscode编译和调试wsl环境的c语言程序

直接f5会报错,提示你改一下json文件
launch.json
{
“version”: “0.2.0”,
“configurations”: [
{
“name”: “(gdb) Launch”,
“type”: “cppdbg”,
“request”: “launch”,
“program”: “ w o r k s p a c e F o l d e r / a . o u t " , " a r g s " : [ ] , " s t o p A t E n t r y " : f a l s e , " c w d " : " {workspaceFolder}/a.out", "args": [], "stopAtEntry": false, "cwd": " 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
}
],
“preLaunchTask”: “build”,
“miDebuggerPath”: “/usr/bin/gdb”
}
]
}

task.json
{
“version”: “2.0.0”,
“tasks”: [
{
“label”: “build”,
“type”: “shell”,
“command”: “gcc”,
“args”: [
“-g”,
f i l e " , " − o " , " {file}", "-o", " file","o","{fileDirname}/ f i l e B a s e n a m e N o E x t e n s i o n . o u t " ] , " g r o u p " : " k i n d " : " b u i l d " , " i s D e f a u l t " : t r u e , " p r o b l e m M a t c h e r " : [ " {fileBasenameNoExtension}.out" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": [" fileBasenameNoExtension.out"],"group":"kind":"build","isDefault":true,"problemMatcher":["gcc”],
“detail”: “Generated task by Debugger.”
}
]
}

相关推荐

  1. vscode编译调试wsl环境c语言程序

    2024-06-06 20:04:01       9 阅读
  2. C语言程序编译链接

    2024-06-06 20:04:01       19 阅读
  3. 使用 vscode 远程调试目标板 c 语言代码

    2024-06-06 20:04:01       11 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-06-06 20:04:01       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-06-06 20:04:01       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-06-06 20:04:01       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-06-06 20:04:01       18 阅读

热门阅读

  1. 公有云服务器部署springboot工程详细步骤

    2024-06-06 20:04:01       11 阅读
  2. golang结构与结构方法实现示例

    2024-06-06 20:04:01       9 阅读
  3. 如何完全清除docker

    2024-06-06 20:04:01       8 阅读
  4. 速率限制中间件AspNetCoreRateLimit

    2024-06-06 20:04:01       7 阅读
  5. 云原生周刊:Gateway API v1.1 发布 | 2024.6.3

    2024-06-06 20:04:01       9 阅读
  6. 设计模式详解(八):外观模式——Facade

    2024-06-06 20:04:01       9 阅读
  7. layui实现鼠标移入/移出时显示/隐藏tips

    2024-06-06 20:04:01       7 阅读
  8. 富格林:揭露黑幕平台保障安全

    2024-06-06 20:04:01       8 阅读
  9. nocas配置加载失败解决-笔记

    2024-06-06 20:04:01       9 阅读