当前位置: 首页 > news >正文

vscode代码调试配置

C/C++代码调试

点击 vscode左侧的 run and debug,新建launch.json 和 tasks.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": "${workspaceFolder}/build/HelloWorld","args": [],"stopAtEntry": false,"cwd": "${fileDirname}","environment": [],"externalConsole": false,"MIMode": "gdb","setupCommands": [{"description": "Enable pretty-printing for gdb","text": "-enable-pretty-printing","ignoreFailures": true},{"description": "Set Disassembly Flavor to Intel","text": "-gdb-set disassembly-flavor intel","ignoreFailures": true}],"preLaunchTask": "build","miDebuggerPath": "/home/sietium/rocm/gdb"}]}

 

tasks.json

{"version" : "2.0.0","tasks": [{"type": "shell","label": "mkdirbuild","command": "mkdir","options": {"cwd": "${workspaceFolder}"},"args": ["-p", "build"],},{"type": "shell","label": "cmake","command": "cmake","options": {"cwd": "${workspaceFolder}/build"},"args": ["-DCMAKE_BUILD_TYPE=Debug",".."],"dependsOn" : ["mkdirbuild"]},{"type": "shell","label": "make","group": {"kind": "build","isDefault": true},"command": "make","args": ["-j",],"options": {"cwd": "${workspaceFolder}/build"},"dependsOn" : ["cmake"]},{"label": "build","dependsOrder": "sequence","dependsOn" : ["cmake", "make"]},],}

http://www.lryc.cn/news/252486.html

相关文章:

  • PTA 7-225 sdut-C语言实验- 冒泡排序中数据交换的次数
  • 新的 BLUFFS 攻击导致蓝牙连接不再私密
  • 安全测试之推荐工具(一)
  • final关键字
  • WPF MVVM模式下如何将UI窗口变量传参到Viewmodel层
  • 条款22:将成员变量声明为private
  • PTA 7-224 sdut-C语言实验-排序问题
  • 【JavaScript】3.2 JavaScript性能优化
  • pytorch bert实现文本分类
  • 《开箱元宇宙》:Madballs 解锁炫酷新境界,人物化身系列大卖
  • 4K-Resolution Photo Exposure Correction at 125 FPS with ~8K Parameters
  • 网络初识:局域网广域网网络通信基础
  • JVM之jps虚拟机进程状态工具
  • C++实现顺序栈的基本操作(扩展)
  • 用python写一个简单的爬虫
  • 分布式追踪
  • make -c VS make -f
  • Unity 代码控制Color无变化
  • 【Erlang进阶学习】2、匿名函数
  • 肖sir__mysql之视图__009
  • FPGA falsh相关知识总结
  • 升辉清洁IPO:广东清洁服务“一哥”还需要讲好全国化的故事
  • Python自动化办公:PDF文件的分割与合并
  • 破解app思路
  • 背景特效插件:Background Effects
  • 36.位运算符
  • C#异常处理-throw语句
  • PlantUML语法(全)及使用教程-时序图
  • 231204 刷题日报
  • PTA 7-229 sdut-C语言实验- 排序