当前位置:网站首页>Vscode download and installation + running C language
Vscode download and installation + running C language
2022-04-23 03:38:00 【Ling Xi】
Download and install infrequently , As time goes on, you will forget , As the saying goes, a good memory is better than a bad pen . Record the download and installation process , It's convenient for you to check later .
edition :Windows 10 pro 1903
Click below to enter the download interface :
Visual Studio Code Official website
windows The system directly clicks to download
install
Open the installer when the download is complete
Choose to accept , next step
Don't put the software in C disc , Click Browse , Select another drive letter as the storage path .
Go straight to the next step
You can choose to create a desktop shortcut , Check the other options you need .
Just install it
complete
success , The first installation should be in English , I set it here to Chinese .
Sinicization
Set the interface to Chinese, you can refer to another blog .
VScode How to set up a Chinese interface
function C/C++
download Code Runner
Find the plug-in store , Input runner.
download Code Runner. Click on install I'll download it here .
Compile operation
1. Create a new folder , use vscode Open folder .
Right click in the folder to create a new file .
Write a simple demo.
Press down F5, choice c++(GDB)
choice gcc.exe Successfully added a launch.json The configuration file
go back to .c Code office , Then press the F5, Click Configure task .
choice C/C++:gcc.exe Successful addition tasks.json file
Both configuration files can be used again .vscode In the folder
Copy and replace . Revisionist midebuggerpath route
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch", // Configuration name , It will be displayed in the drop-down menu of startup configuration
"type": "cppdbg", // Configuration type , It's only for cppdbg
"request": "launch", // Request configuration type , It can be for launch( start-up ) or attach( additional )
"program": "${workspaceFolder}/${fileBasenameNoExtension}.exe", // The path of the program to be debugged
"args": [], // Command line parameters passed to the program during program debugging , It is usually set to empty
"stopAtEntry": false, // Set to true When the program will be suspended at the program entrance , Generally set as false
"cwd": "${workspaceFolder}", // Working directory when debugging program , It's usually ${workspaceRoot} That is, the directory where the code is located workspaceRoot Has been abandoned , Now changed to workspaceFolder
"environment": [],
"externalConsole": true, // Whether to display the console window when debugging , Generally set as true Display console
"MIMode": "gdb",
"miDebuggerPath": "G:/compiler/MinGW/bin/gdb.exe", // miDebugger The path of , Pay attention to the relationship between MinGw The path corresponds to
"preLaunchTask": "gcc", // Tasks performed before debugging session start , It's usually a compiler ,c++ by g++, c by gcc
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
]
}
]
}
tasks.json
{
"version": "2.0.0",
"command": "gcc",
"args": [
"-g",
"${file}",
"-o",
"${fileBasenameNoExtension}.exe"
], // Compile command parameters
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
After configuring the file , Press down F5. Dangdang !!! The successful running !
版权声明
本文为[Ling Xi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220601418708.html
边栏推荐
- Key point detection of human hand based on mediapipe
- The art of concurrent programming (5): the use of reentrantlock
- ROS series (IV): ROS communication mechanism series (3): parameter server
- JS changes the words separated by dashes into camel style
- 打卡:4.23 C语言篇 -(1)初识C语言 - (12)结构体
- Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)
- Design and implementation of redis (2): how to handle expired keys
- A hundred dollars for a hundred chickens
- Design and implementation of redis (6): how redis achieves high availability
- If statement format flow
猜你喜欢
L3-011 直捣黄龙 (30 分)
Redis (17) -- redis cache related problem solving
深度学习笔记(二)——激活函数原理与实现
Source code and update details of new instance segmentation network panet (path aggregation network for instance segmentation)
MySQL zip installation tutorial
PYMOL-note
Section 1 array and slicing in Chapter 6
Problem a: face recognition
Redis(17) -- Redis缓存相关问题解决
Visual programming -- how to customize the mouse cursor
随机推荐
String input problem
Unity games and related interview questions
QT uses drag and drop picture to control and mouse to move picture
C-11 problem h: treasure chest 2
Leetcode punch in diary day 01
2022 团体程序设计天梯赛 模拟赛 L2-4 哲哲打游戏 (25 分)
Code forces round # 784 (DIV. 4) solution (First AK CF (XD)
A sword is a sword. There is no difference between a wooden sword and a copper sword
Abstract classes, interfaces and common keywords
淺學一下I/O流和File類文件操作
vscode删除卸载残余
Talent Plan 学习营初体验:交流+坚持 开源协作课程学习的不二路径
Vs Studio modifie le langage C scanf et d'autres erreurs
The art of concurrent programming (2): synchronized usage scenarios
Use of rotary selector wheelpicker
Redis(17) -- Redis缓存相关问题解决
Design and implementation of redis (6): how redis achieves high availability
Definition format of array
Three types of jump statements
7-3 poly width