当前位置:网站首页>VScode配置makefile编译
VScode配置makefile编译
2022-07-29 04:30:00 【Once_day】
VScode配置makefile编译
Author:onceday date:2022年7月26日
1.修改终端任务配置(Terminal)
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build", //标签名,用于在调试里调用
"type": "shell", //类型,可选shell和process
"command": "make",//在命令行的命令
"args": [
"clean",//用于清楚编译中间件
],//命令参数
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$gcc" //错误抓取
}
]
}
此处重点配置label、command,args即可。
调试需要gcc编译-g选项的二进制文件,即携带调试信息。
2.修改调试启动文件(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}/a.exe",//输入调式程序的执行路径
"args": [],//参数表
"stopAtEntry": false,//进函数暂停
"cwd": "${fileDirname}",//进入目录
"environment": [],
"externalConsole": false,//额外的控制台
"MIMode": "gdb",//调试的程序
"miDebuggerPath": "/path/to/gdb",//调试程序的路径
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "build",//加载前先执行编译任务
}
]
}
- 重要的是program,这个指定要调试的程序。
- 有些时候,gdb需要指定路径,即miDebuggerPath
3.可以使用gdb server远程调试作为替代方案。
边栏推荐
- Multi rotor six axis hardware selection
- 12.优先级队列和惰性队列
- STL source code analysis (Hou Jie) notes - STL overview
- [c language] use the reverse order output of the linked list (bidirectional linked list)
- 不会就坚持61天吧 最短的单词编码
- On quotation
- leetcode 686.重复叠加字符串 KMP方法(C语言实现)
- [material delivery UAV] record (ROS + Px4 + yolov5 + esp8266 + steering gear)
- Pyscript cannot import package
- Shell string segmentation
猜你喜欢

Why is it necessary to scale the attention before softmax (why divide by the square root of d_k)

使用容器部署Jenkins

Realize the effect of univariate quadratic equation through JS. Enter the coefficients of a, B and C to calculate the values of X1 and x2

(heap sort) heap sort is super detailed, I don't believe you can't (C language code implementation)

TypeError: Cannot read properties of undefined (reading ‘then‘)

Not for 61 days. The shortest word code

Auto.js脚本开发环境搭建

Unity基础(3)—— unity中的各种坐标系

9.延迟队列

11. Backup switch
随机推荐
C language force buckle question 61 of the rotating list. Double ended queue and construction of circular linked list
Installation and use of stm32cubemx (5.3.0)
9. Delay queue
Definition and implementation of stack and queue (detailed)
Pycharm reports an error when connecting to the virtual machine database
Pytoch distributed training
Use of construction methods
Niuke IOI weekly 27 popularity group
异常处理:pyemd或PyEMD找不到
Multi rotor six axis hardware selection
11. Backup switch
【Express连接MySQL数据库】
What is the use of meta-info?
用 ZEGO Avatar 做一个虚拟人|虚拟主播直播解决方案
New year's greetings from programmers
LeetCode_ Stack topics
visio画网格
Shell string segmentation
12. Priority queue and inert queue
11.备份交换机