当前位置:网站首页>Vscode configuration makefile compilation
Vscode configuration makefile compilation
2022-07-29 04:37:00 【Once_ day】
VScode To configure makefile compile
Author:onceday date:2022 year 7 month 26 Japan
1. Modify the terminal task configuration (Terminal)
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build", // Tag name , Used to call... In debugging
"type": "shell", // type , Optional shell and process
"command": "make",// Commands on the command line
"args": [
"clean",// For clear compilation of middleware
],// Command parameter
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$gcc" // Wrong grab
}
]
}
Key configuration here label、command,args that will do .
Debugging requires gcc compile -g Option binary , That is, carry debugging information .
2. Modify the debugging startup file (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",// Fixed type
"request": "launch",
"program": "${workspaceFolder}/a.exe",// Enter the execution path of the modal program
"args": [],// Parameter table
"stopAtEntry": false,// Progressive function pause
"cwd": "${fileDirname}",// Entry directory
"environment": [],
"externalConsole": false,// Extra console
"MIMode": "gdb",// Debugging program
"miDebuggerPath": "/path/to/gdb",// Path to debugger
"setupCommands": [
{
"description": " by gdb Enable neat printing ",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": " Set the disassembly style to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "build",// Execute the compilation task before loading
}
]
}
- It is important to program, This specifies the program to debug .
- Sometimes ,gdb The path needs to be specified , namely miDebuggerPath
3. have access to gdb server Remote debugging as an alternative .
边栏推荐
- STL source code analysis (Hou Jie) notes -- Classification and testing of stl containers
- The daily life of programmers
- leetcode 686.重复叠加字符串 KMP方法(C语言实现)
- Install the gym corresponding to mujoco in the spinning up tutorial, and the error mjpro150 is reported
- [express connection to MySQL database]
- The third ACM program design competition of Wuhan University of Engineering
- C language: structure simple syntax summary
- i++与++i详解
- Laya中的A星寻路
- MySQL - clustered index and secondary index
猜你喜欢
Won't you just stick to 69 days? Merge range
Understand the Internet giant [the war between China and Taiwan] and the development thinking of China and Taiwan
Definition and implementation of stack and queue (detailed)
Not for 61 days. The shortest word code
redux快速上手
TypeError: Cannot read properties of undefined (reading ‘then‘)
使用容器部署Jenkins
No, just stick to it for 59 days
网络之以太网
[express connection to MySQL database]
随机推荐
Star a pathfinding in LAYA
Leetcode 686. KMP method of repeatedly superimposing strings (implemented in C language)
Classes and objects (II)
Make a virtual human with zego avatar | virtual anchor live broadcast solution
LeetCode_ Stack topics
Exception resolution: error of not finding edu.stanford.nlp.semgraph.semgrex.semgrexpattern in cococaption package
Not for 61 days. The shortest word code
GCC基础知识
MySQL - clustered index and secondary index
命令行交互工具(最新版) inquirer 实用教程
Tower of Hanoi classic recursion problem (C language implementation)
[c language] PTA 7-51 sum the first n terms of odd part sequence
No, just stick to it for 59 days
[C] PTA 6-8 finding the height of binary tree
visio画网格
leetcode 686.重复叠加字符串 KMP方法(C语言实现)
Use of torch.optim optimizer in pytorch
Pyqt5 learning pit encounter and pit drainage (2) buttons in qformlayout layout cannot be displayed
String, array, generalized table (detailed)
[c language] PTA 7-50 output Fahrenheit Celsius temperature conversion table