title
Set Up C++ Development With Visual Studio Code on Windows 10 (VS Code)
description
In this video I am going to show, How to Set Up C++ Development With Visual Studio Code on Windows 10. We will use MinGW with VS code as our compiler and debugging tool. So First I will show How to install mingw. The we will see how to create, build and compile our first C++ Program on VScode.
With an updated VS Code you can do it in the following manner:
Hit (Ctrl+P) and type:
ext install cpptools
Open a folder (Ctrl+K & Ctrl+O) and create a new file inside the folder with the extension .cpp (ex: main.cpp):
Type in your code and hit save.
Press (Ctrl+Shift+P and type, Configure task runner and then select other at the bottom of the list.
{
"version": "2.0.0",
"tasks": [
{
"label": "build hello world",
"type": "shell",
"command": "g++",
"args": [
"-g", "helloworld.cpp"
],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Hit (Ctrl+Shift+B to run Build task. This will create the .obj and .exe files for the project.
For debugging the project, Hit F5 and select C++(Windows).
In launch.json file, edit the following line and save the file:
Below is an example using the MinGW GDB debugger:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\mingw\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build hello world"
}
]
}
Hit F5.
★★★Top Online Courses From ProgrammingKnowledge ★★★
Python Programming Course ➡️ http://bit.ly/2vsuMaS ⚫️ http://bit.ly/2GOaeQB
Java Programming Course ➡️ http://bit.ly/2GEfQMf ⚫️ http://bit.ly/2Vvjy4a
Bash Shell Scripting Course ➡️ http://bit.ly/2DBVF0C ⚫️ http://bit.ly/2UM06vF
Linux Command Line Tutorials ➡️ http://bit.ly/2IXuil0 ⚫️ http://bit.ly/2IXukt8
C Programming Course ➡️ http://bit.ly/2GQCiD1 ⚫️ http://bit.ly/2ZGN6ej
C++ Programming Course ➡️ http://bit.ly/2V4oEVJ ⚫️ http://bit.ly/2XMvqMs
PHP Programming Course ➡️ http://bit.ly/2XP71WH ⚫️ http://bit.ly/2vs3od6
Android Development Course ➡️ http://bit.ly/2UHih5H ⚫️ http://bit.ly/2IMhVci
C# Programming Course ➡️ http://bit.ly/2Vr7HEl ⚫️ http://bit.ly/2W6RXTU
JavaFx Programming Course ➡️ http://bit.ly/2XMvZWA ⚫️ http://bit.ly/2V2CoAi
NodeJs Programming Course ➡️ http://bit.ly/2GPg7gA ⚫️ http://bit.ly/2GQYTQ2
Jenkins Course For Developers and DevOps ➡️ http://bit.ly/2Wd4l4W ⚫️ http://bit.ly/2J1B1ug
Scala Programming Tutorial Course ➡️ http://bit.ly/2PysyA4 ⚫️ http://bit.ly/2PCaVj2
Bootstrap Responsive Web Design Tutorial ➡️ http://bit.ly/2DFQ2yC ⚫️ http://bit.ly/2VoJWwH
MongoDB Tutorial Course ➡️ http://bit.ly/2LaCJfP ⚫️ http://bit.ly/2WaI7Ap
QT C++ GUI Tutorial For Beginners ➡️ http://bit.ly/2vwqHSZ
★★★ Online Courses to learn ★★★
Get 2 FREE Months of Unlimited Classes from skillshare - https://skillshare.eqcm.net/r1KEj
Data Science - http://bit.ly/2lD9h5L | http://bit.ly/2lI8wIl
Machine Learning - http://bit.ly/2WGGQpb | http://bit.ly/2GghLXX
Artificial Intelligence - http://bit.ly/2lYqaYx | http://bit.ly/2NmaPya
MERN Stack E-Degree Program - http://bit.ly/2kx2NFe | http://bit.ly/2lWj4no
DevOps E-degree - http://bit.ly/2k1PwUQ | http://bit.ly/2k8Ypfy
Data Analytics with R - http://bit.ly/2lBKqz8 | http://bit.ly/2lAjos3
AWS Certification Training - http://bit.ly/2kmLtTu | http://bit.ly/2lAkQL1
Projects in Java - http://bit.ly/2kzn25d | http://bit.ly/2lBMffs
Machine Learning With TensorFlow - http://bit.ly/2m1z3AF | http://bit.ly/2lBMhnA
Angular 8 - Complete Essential Guide - http://bit.ly/2lYvYRP
Kotlin Android Development Masterclass - http://bit.ly/2GcblsI
Learn iOS Programming Building Advance Projects - http://bit.ly/2kyX7ue
★★★ Follow ★★★
My Website - http://www.codebind.com
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
detail
{'title': 'Set Up C++ Development With Visual Studio Code on Windows 10 (VS Code)', 'heatmap': [{'end': 312.017, 'start': 278.867, 'weight': 0.87}, {'end': 639.52, 'start': 586.915, 'weight': 0.79}, {'end': 796.378, 'start': 777.447, 'weight': 0.868}, {'end': 1002.676, 'start': 948.224, 'weight': 0.745}], 'summary': 'Demonstrates setting up a c++ development environment using mingw on visual studio code on windows 10, covering installation, setting up mingw directory, adding path to environment variable system, configuring c++ compilation, and debugging c++ code with gdb in visual studio code.', 'chapters': [{'end': 250.746, 'segs': [{'end': 31.837, 'src': 'embed', 'start': 0.963, 'weight': 0, 'content': [{'end': 1.883, 'text': 'Hey guys, in this video,', 'start': 0.963, 'duration': 0.92}, {'end': 11.546, 'text': "I'm going to show you how you can set up the C++ development environment on your Visual Studio Code editor on your Windows 10 operating system.", 'start': 1.883, 'duration': 9.663}, {'end': 18.048, 'text': "I'm going to show you how to do it with MinGW compiler and debugger.", 'start': 12.467, 'duration': 5.581}, {'end': 23.85, 'text': 'We are not going to use any MSVC or Microsoft related compiler.', 'start': 18.428, 'duration': 5.422}, {'end': 28.694, 'text': 'Okay, so I already have installed the Visual Studio Code editor.', 'start': 24.23, 'duration': 4.464}, {'end': 31.837, 'text': "So if you don't have it, it's really easy to install it.", 'start': 28.734, 'duration': 3.103}], 'summary': 'Setting up c++ development on visual studio code using mingw on windows 10.', 'duration': 30.874, 'max_score': 0.963, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY963.jpg'}, {'end': 107.088, 'src': 'embed', 'start': 79.853, 'weight': 2, 'content': [{'end': 88.655, 'text': 'and then we are going to just click on this green button which says MinGW, get setup.exe file.', 'start': 79.853, 'duration': 8.802}, {'end': 90.175, 'text': "so I'm going to just click on this.", 'start': 88.655, 'duration': 1.52}, {'end': 94.899, 'text': 'So now I can see the download has been started and already finished.', 'start': 90.935, 'duration': 3.964}, {'end': 99.122, 'text': "So I'm going to click on this MinGW get setup.exe.", 'start': 95.399, 'duration': 3.723}, {'end': 105.467, 'text': "file and I'm going to minimize the browser and now you can see the MinGW installer manager.", 'start': 99.122, 'duration': 6.345}, {'end': 107.088, 'text': 'setup tool has been started.', 'start': 105.467, 'duration': 1.621}], 'summary': 'Downloaded mingw setup.exe file and started mingw installer manager setup tool.', 'duration': 27.235, 'max_score': 79.853, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY79853.jpg'}, {'end': 168.207, 'src': 'embed', 'start': 136.909, 'weight': 3, 'content': [{'end': 141.573, 'text': 'So once this step is complete, we will see this continue button is activated.', 'start': 136.909, 'duration': 4.664}, {'end': 143.534, 'text': "So I'm going to click on this continue button.", 'start': 141.673, 'duration': 1.861}, {'end': 151.678, 'text': 'which is going to just start the MinGW installation manager.', 'start': 144.314, 'duration': 7.364}, {'end': 155.7, 'text': "Okay And it's going to show us these options.", 'start': 152.098, 'duration': 3.602}, {'end': 157.461, 'text': 'You can see here.', 'start': 156.041, 'duration': 1.42}, {'end': 168.207, 'text': "it's going to show us these options, and these options are MinGW developer tool, MinGW 32 base and then GCC and GCC Fortin.", 'start': 157.461, 'duration': 10.746}], 'summary': 'After completing the step, the continue button activates to start the mingw installation manager, offering options such as mingw developer tool, mingw 32 base, gcc, and gcc fortin.', 'duration': 31.298, 'max_score': 136.909, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY136909.jpg'}, {'end': 250.746, 'src': 'embed', 'start': 225.397, 'weight': 4, 'content': [{'end': 232.762, 'text': 'So now all the main GW packages are installed and I can see this message which says all changes were applied successfully.', 'start': 225.397, 'duration': 7.365}, {'end': 235.265, 'text': 'you may now close the dialog.', 'start': 233.522, 'duration': 1.743}, {'end': 240.592, 'text': "so I'm going to just close this dialog and you can see everything is green in my case.", 'start': 235.265, 'duration': 5.327}, {'end': 242.716, 'text': "so I'm going to just close this installer.", 'start': 240.592, 'duration': 2.124}, {'end': 250.746, 'text': 'also, and just for checking, I will just open my folder explorer And here in the C directory,', 'start': 242.716, 'duration': 8.03}], 'summary': 'Main gw packages installed, changes applied successfully, all green, installer closed.', 'duration': 25.349, 'max_score': 225.397, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY225397.jpg'}], 'start': 0.963, 'title': 'Setting up c++ development environment on visual studio code', 'summary': 'Demonstrates setting up c++ development environment using mingw on visual studio code on windows 10, excluding msvc, and highlighting availability as a free and open source tool. it also outlines installing mingw, accessing the website, downloading, installing necessary packages, and verifying installation.', 'chapters': [{'end': 47.806, 'start': 0.963, 'title': 'Setting up c++ development environment on visual studio code', 'summary': 'Demonstrates how to set up the c++ development environment using the mingw compiler and debugger on the visual studio code editor on a windows 10 operating system, emphasizing the exclusion of msvc or microsoft related compiler and the availability of visual studio code as a free and open source tool.', 'duration': 46.843, 'highlights': ['The chapter emphasizes the exclusion of MSVC or Microsoft related compiler and the use of the MinGW compiler and debugger for setting up the C++ development environment.', 'The chapter highlights the availability of Visual Studio Code as a free and open source tool for setting up the C++ development environment.', 'The chapter mentions the process of downloading and installing the Visual Studio Code editor from its website for setting up the C++ development environment.']}, {'end': 250.746, 'start': 47.806, 'title': 'Installing mingw for development', 'summary': 'Outlines the process of installing mingw for development, including accessing the mingw website, downloading and installing the necessary packages, and verifying the successful installation.', 'duration': 202.94, 'highlights': ['Access the MinGW website and download the MinGW installer manager setup tool, which starts the MinGW installation process.', 'Select and mark MinGW developer tool, MinGW 32 base, GCC, and other related packages for installation, and proceed to apply changes, leading to the installation of all packages.', 'Verify the successful installation of all MinGW packages and close the installer, ensuring a green status for all components.', 'The process involves accessing the MinGW website, downloading the installer, selecting and installing necessary packages, and verifying the successful installation.']}], 'duration': 249.783, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY963.jpg', 'highlights': ['Visual Studio Code is highlighted as a free and open source tool for setting up the C++ development environment.', 'The chapter emphasizes the exclusion of MSVC and the use of the MinGW compiler and debugger for setting up the C++ development environment.', 'Access the MinGW website and download the MinGW installer manager setup tool to start the MinGW installation process.', 'Select and mark MinGW developer tool, MinGW 32 base, GCC, and other related packages for installation, and proceed to apply changes.', 'Verify the successful installation of all MinGW packages and close the installer, ensuring a green status for all components.']}, {'end': 605.181, 'segs': [{'end': 278.087, 'src': 'embed', 'start': 250.746, 'weight': 0, 'content': [{'end': 255.75, 'text': "I'm going to just check whether minGW directory is there or not.", 'start': 250.746, 'duration': 5.004}, {'end': 259.492, 'text': 'So you can see, minGW directory is created for us right?', 'start': 255.79, 'duration': 3.702}, {'end': 269.24, 'text': "So I'm going to just go inside this directory and I'm going to go inside bin folder inside this minGW directory.", 'start': 260.053, 'duration': 9.187}, {'end': 275.184, 'text': "And I'm going to copy this path and I'm going to add it to my environment variable.", 'start': 269.8, 'duration': 5.384}, {'end': 278.087, 'text': 'So just copy this path up to bin.', 'start': 275.244, 'duration': 2.843}], 'summary': 'Creating mingw directory and adding its path to environment variable.', 'duration': 27.341, 'max_score': 250.746, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY250746.jpg'}, {'end': 312.017, 'src': 'heatmap', 'start': 278.867, 'weight': 0.87, 'content': [{'end': 285.11, 'text': 'and then right click on your start button here and then just search for system.', 'start': 278.867, 'duration': 6.243}, {'end': 289.432, 'text': 'so just click on system here and once this system window opens,', 'start': 285.11, 'duration': 4.322}, {'end': 300.917, 'text': 'you just need to go to advanced system settings and then environment variables and then just choose the path environment variable in system variable,', 'start': 289.432, 'duration': 11.485}, {'end': 312.017, 'text': 'and then either double click on it or just click edit, and then we are going to add a new variable and then just paste this path, which is c colon,', 'start': 300.917, 'duration': 11.1}], 'summary': "To add a path environment variable, go to advanced system settings, choose the path environment variable, and add the path 'c:'.", 'duration': 33.15, 'max_score': 278.867, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY278867.jpg'}, {'end': 358.327, 'src': 'embed', 'start': 330.881, 'weight': 2, 'content': [{'end': 334.982, 'text': "so I'm going to just open my command prompt.", 'start': 330.881, 'duration': 4.101}, {'end': 344.829, 'text': 'so right click on your windows button once again and then just click command prompt and in here we are going to check the version of g plus plus.', 'start': 334.982, 'duration': 9.847}, {'end': 352.714, 'text': 'so just write g plus plus, minus, minus version and then press enter, which is going to give you the version of g plus plus.', 'start': 344.829, 'duration': 7.885}, {'end': 358.327, 'text': 'in our case, we have installed gcc version 6.3..', 'start': 352.714, 'duration': 5.613}], 'summary': 'Checking g++ version using command prompt, installed gcc version 6.3', 'duration': 27.446, 'max_score': 330.881, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY330881.jpg'}, {'end': 497.635, 'src': 'embed', 'start': 468.777, 'weight': 1, 'content': [{'end': 477.582, 'text': 'so I am going to click on this extension And you will be able to see the details about this on the right hand side right?', 'start': 468.777, 'duration': 8.805}, {'end': 487.808, 'text': "And you can see about 5.8 million extensions have already been downloaded, and it's from Microsoft.", 'start': 478.323, 'duration': 9.485}, {'end': 492.931, 'text': 'So you just need to click on this install button is going to install this extension.', 'start': 487.828, 'duration': 5.103}, {'end': 497.635, 'text': 'and once this extension is installed, you just need to reload your visual studio code.', 'start': 493.471, 'duration': 4.164}], 'summary': '5.8 million microsoft extensions downloaded, click install to get it.', 'duration': 28.858, 'max_score': 468.777, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY468777.jpg'}, {'end': 579.413, 'src': 'embed', 'start': 545.934, 'weight': 5, 'content': [{'end': 560.661, 'text': "and I'm going to just create a really basic program here, so std cout and then let's print hello world and then I'm going to just say std endline,", 'start': 545.934, 'duration': 14.727}, {'end': 564.04, 'text': "Okay, and I'm going to save this file.", 'start': 561.198, 'duration': 2.842}, {'end': 570.946, 'text': 'And you can see on this include IO stream, I see this green squiggly line.', 'start': 564.301, 'duration': 6.645}, {'end': 579.413, 'text': 'Okay, so when I hover over this green squiggly line, it says include add detected, please update your include path.', 'start': 571.266, 'duration': 8.147}], 'summary': "Creating a basic program to print 'hello world' with an include io stream issue", 'duration': 33.479, 'max_score': 545.934, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY545934.jpg'}], 'start': 250.746, 'title': 'Setting up mingw and visual studio code for c++', 'summary': 'Covers setting up the mingw directory by adding its path to the environment variable system, enabling access to its bin folder, navigating through advanced system settings, checking the version of g++, installing c/c++ extension from microsoft, and creating a basic c++ program in visual studio code.', 'chapters': [{'end': 300.917, 'start': 250.746, 'title': 'Setting up mingw directory', 'summary': 'Discusses setting up the mingw directory by adding its path to the environment variable system, enabling access to its bin folder, and navigating through advanced system settings.', 'duration': 50.171, 'highlights': ['Adding minGW directory path to the system environment variable allows access to its bin folder, facilitating utilization of its functionalities.', 'Navigating through advanced system settings is essential to access environment variables and add the minGW directory path.', 'The created minGW directory provides the necessary components for development and can be accessed through the bin folder.']}, {'end': 605.181, 'start': 300.917, 'title': 'Setting up mingw and visual studio code for c++', 'summary': 'Covers setting up mingw and visual studio code for c++. it includes steps such as checking the version of g++, installing c/c++ extension from microsoft, and creating a basic c++ program in visual studio code.', 'duration': 304.264, 'highlights': ["Installed g++ version 6.3.0 Checked the g++ version using 'g++ --version', revealing the successful installation of g++ version 6.3.0.", 'Installed C/C++ extension from Microsoft with 5.8 million downloads Installed the official C/C++ extension from Microsoft with 5.8 million downloads and reloaded Visual Studio Code after installation.', "Created a basic C++ program in Visual Studio Code Created a new 'main.cpp' file, added code to print 'hello world', and resolved an 'include path' issue by editing the include path settings."]}], 'duration': 354.435, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY250746.jpg', 'highlights': ['Adding minGW directory path to the system environment variable allows access to its bin folder, facilitating utilization of its functionalities.', 'Installed C/C++ extension from Microsoft with 5.8 million downloads Installed the official C/C++ extension from Microsoft with 5.8 million downloads and reloaded Visual Studio Code after installation.', "Installed g++ version 6.3.0 Checked the g++ version using 'g++ --version', revealing the successful installation of g++ version 6.3.0.", 'Navigating through advanced system settings is essential to access environment variables and add the minGW directory path.', 'The created minGW directory provides the necessary components for development and can be accessed through the bin folder.', "Created a basic C++ program in Visual Studio Code Created a new 'main.cpp' file, added code to print 'hello world', and resolved an 'include path' issue by editing the include path settings."]}, {'end': 965.427, 'segs': [{'end': 659.703, 'src': 'embed', 'start': 606.181, 'weight': 3, 'content': [{'end': 616.666, 'text': 'and once you do this, you will see a folder created here which is called dot vs code, and the new file is created here, which is c underscore,', 'start': 606.181, 'duration': 10.485}, {'end': 629.593, 'text': 'c plus plus properties, dot json and here all the include path which are the default include paths for every uh os, for example mac os, and then,', 'start': 616.666, 'duration': 12.927}, {'end': 639.52, 'text': 'when you scroll down, there will be, uh, the option for linux and in our case, uh, the option for the windows is valid for us, right.', 'start': 629.593, 'duration': 9.927}, {'end': 646.287, 'text': 'so this is the option for windows and you can see, uh, the include path is right.', 'start': 639.52, 'duration': 6.767}, {'end': 648.549, 'text': "now it's workspace root.", 'start': 646.287, 'duration': 2.262}, {'end': 656.799, 'text': 'so here what we need to add is we need to add the include path for the ios stream or all the c plus plus.', 'start': 648.869, 'duration': 7.93}, {'end': 658.602, 'text': 'uh, include paths, right.', 'start': 656.799, 'duration': 1.803}, {'end': 659.703, 'text': 'so how we can do it?', 'start': 658.602, 'duration': 1.101}], 'summary': 'Instructions for setting up include paths in vs code for c++ development.', 'duration': 53.522, 'max_score': 606.181, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY606181.jpg'}, {'end': 818.974, 'src': 'heatmap', 'start': 777.447, 'weight': 0, 'content': [{'end': 788.033, 'text': "By the way, if you don't know how to create this C CPP file from this squiggly line, you can just press control, shift P,", 'start': 777.447, 'duration': 10.586}, {'end': 796.378, 'text': 'and here you just need to search for C backslash CPP added configuration, and then it will open the same file.', 'start': 788.033, 'duration': 8.345}, {'end': 805.244, 'text': 'Now you are not still ready to compile your C++ program because you need to create two more files.', 'start': 796.678, 'duration': 8.566}, {'end': 812.149, 'text': 'One is task.json and another is launch.json for launching your debugger.', 'start': 805.384, 'duration': 6.765}, {'end': 815.852, 'text': "So let's create the task.json file first of all.", 'start': 812.489, 'duration': 3.363}, {'end': 818.974, 'text': 'So just press Ctrl-Shift-P once again.', 'start': 816.312, 'duration': 2.662}], 'summary': 'Instructions for setting up c++ programming environment and creating necessary configuration files, including task.json and launch.json.', 'duration': 55.53, 'max_score': 777.447, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY777447.jpg'}, {'end': 934.757, 'src': 'embed', 'start': 905.679, 'weight': 2, 'content': [{'end': 910.281, 'text': 'And then inside this square bracket, you can add your options.', 'start': 905.679, 'duration': 4.602}, {'end': 915.223, 'text': 'For example, first option is minus G for the debugging option.', 'start': 910.501, 'duration': 4.722}, {'end': 917.284, 'text': 'And second is the file name.', 'start': 915.783, 'duration': 1.501}, {'end': 927.191, 'text': 'So main dot CPP, right? Now there is one more thing you need to do here is you need to add which kind of task is it.', 'start': 917.504, 'duration': 9.687}, {'end': 929.072, 'text': "So it's a build task.", 'start': 927.311, 'duration': 1.761}, {'end': 934.757, 'text': 'So we will add one more option here which is group option.', 'start': 929.092, 'duration': 5.665}], 'summary': 'Instructions for adding options in square brackets for a build task in a programming environment.', 'duration': 29.078, 'max_score': 905.679, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY905679.jpg'}], 'start': 606.181, 'title': 'Setting up c++ in visual studio code', 'summary': 'Provides instructions on setting include paths and c++ compilation in visual studio code, including default paths for mac os, adding paths for windows, configuring c++ compilation, creating json files, and setting up compilation commands and options.', 'chapters': [{'end': 763.344, 'start': 606.181, 'title': 'Setting include paths for c++ in visual studio code', 'summary': 'Provides instructions on setting include paths for c++ in visual studio code, including default paths for mac os, and adding paths for windows, with specific details like folder structure and syntax for including paths.', 'duration': 157.163, 'highlights': ['The chapter provides instructions on setting include paths for C++ in Visual Studio Code, including default paths for Mac OS, and adding paths for Windows.', 'It explains the folder structure and specific paths to include for C++ in Visual Studio Code.', 'The transcript offers detailed instructions on including paths for C++ in Visual Studio Code, including the folder structure and syntax required for Windows paths.']}, {'end': 965.427, 'start': 763.444, 'title': 'Setting up c++ compilation in visual studio code', 'summary': 'Explains how to configure c++ compilation in visual studio code, including creating a c cpp properties json file and task.json and launch.json files for debugging, and provides instructions for setting up compilation commands and options.', 'duration': 201.983, 'highlights': ['Instructions for creating task.json and launch.json files for debugging The chapter provides step-by-step instructions for creating task.json and launch.json files for debugging in Visual Studio Code.', 'Instructions for creating C CPP properties JSON file for C++ compilation It explains how to create a C CPP properties JSON file to set up C++ compilation in Visual Studio Code.', 'Detailed explanation of compilation commands and options The chapter offers a detailed explanation of compilation commands and options, including specifying the command, args, and task group for building the program.']}], 'duration': 359.246, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY606181.jpg', 'highlights': ['The chapter provides step-by-step instructions for creating task.json and launch.json files for debugging in Visual Studio Code.', 'It explains how to create a C CPP properties JSON file to set up C++ compilation in Visual Studio Code.', 'The chapter offers a detailed explanation of compilation commands and options, including specifying the command, args, and task group for building the program.', 'The chapter provides instructions on setting include paths for C++ in Visual Studio Code, including default paths for Mac OS, and adding paths for Windows.', 'It explains the folder structure and specific paths to include for C++ in Visual Studio Code.', 'The transcript offers detailed instructions on including paths for C++ in Visual Studio Code, including the folder structure and syntax required for Windows paths.']}, {'end': 1214.54, 'segs': [{'end': 1128.622, 'src': 'embed', 'start': 965.427, 'weight': 0, 'content': [{'end': 971.991, 'text': "so just press ctrl shift b And then it's going to start the task first.", 'start': 965.427, 'duration': 6.564}, {'end': 985.703, 'text': "You can see it's executing task which is g++-g main.cpp, right? And you will see here your output file is also created which is a.exe.", 'start': 972.332, 'duration': 13.371}, {'end': 992.309, 'text': 'If you don\'t give the option "-o", it\'s going to just create this default executable file which is a.exe.', 'start': 986.244, 'duration': 6.065}, {'end': 1002.676, 'text': 'Now how to run this a.exe? So what you can do here is you can just open a new terminal here.', 'start': 993.55, 'duration': 9.126}, {'end': 1007.879, 'text': 'So you can just click on this plus button which is going to open the new terminal.', 'start': 1002.736, 'duration': 5.143}, {'end': 1013.903, 'text': 'You can see PowerShell is open or your default terminal will be open and then you just need to run a.exe file.', 'start': 1007.919, 'duration': 5.984}, {'end': 1021.59, 'text': "So it's going to open inside your default folder inside your project folder.", 'start': 1016.204, 'duration': 5.386}, {'end': 1024.092, 'text': "So you don't need to change the directory.", 'start': 1021.61, 'duration': 2.482}, {'end': 1031.961, 'text': 'You just need to run this a.exe command here and then press enter, which is just going to print hello world here.', 'start': 1024.532, 'duration': 7.429}, {'end': 1034.904, 'text': 'So we have successfully built and run our code here.', 'start': 1032.06, 'duration': 2.844}, {'end': 1039.028, 'text': "Right Now let's see how we can debug our C++ code.", 'start': 1035.184, 'duration': 3.844}, {'end': 1046.14, 'text': 'So for debugging, what we need to do is we need to go on this debugging option.', 'start': 1040.598, 'duration': 5.542}, {'end': 1050.541, 'text': 'So just click on this debug option, which is this button.', 'start': 1046.22, 'duration': 4.321}, {'end': 1058.964, 'text': 'And then once you are inside this debugging option, you just need to click on this green button, which says start debugging.', 'start': 1051.322, 'duration': 7.642}, {'end': 1060.725, 'text': 'So just click on this button.', 'start': 1059.004, 'duration': 1.721}, {'end': 1066.227, 'text': "And now it's going to just ask us which type of debugging we want to do.", 'start': 1061.585, 'duration': 4.642}, {'end': 1073.95, 'text': 'So we want to do the C++ GDB debugging because we are working with MinGW which is GDB.', 'start': 1066.847, 'duration': 7.103}, {'end': 1079.932, 'text': 'So just click on this option which says C++ GDB forward slash LLDB.', 'start': 1074.27, 'duration': 5.662}, {'end': 1091.276, 'text': "Okay, so I'm going to click on this option which is going to create a launch.json file inside your VS code directory which is created.", 'start': 1080.232, 'duration': 11.044}, {'end': 1096.781, 'text': 'okay. so now there are three files which we have created.', 'start': 1091.596, 'duration': 5.185}, {'end': 1100.865, 'text': 'one is c c plus plus property json file.', 'start': 1096.781, 'duration': 4.084}, {'end': 1109.153, 'text': 'second is tax.json file, and for debugging you just need to create this one, which is launch.json file.', 'start': 1100.865, 'duration': 8.288}, {'end': 1118.757, 'text': 'Now in here we just need to give the debugging path, which is the path to our MinGW GDB exe file.', 'start': 1109.873, 'duration': 8.884}, {'end': 1124.58, 'text': "So I'm once again going to go to the folder explorer and then open the MinGW directory.", 'start': 1118.777, 'duration': 5.803}, {'end': 1128.622, 'text': "And inside the MinGW directory, I'm going to just click on bin directory.", 'start': 1125.24, 'duration': 3.382}], 'summary': 'Demonstrates building, running, and debugging c++ code in vs code, creating launch.json file, and specifying the debugging path to mingw gdb exe file.', 'duration': 163.195, 'max_score': 965.427, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY965427.jpg'}, {'end': 1214.54, 'src': 'embed', 'start': 1165.305, 'weight': 5, 'content': [{'end': 1168.486, 'text': 'Okay, which is the debugger for us.', 'start': 1165.305, 'duration': 3.181}, {'end': 1174.628, 'text': 'Now there is one more thing we can do here is we can add the pre-launch task here.', 'start': 1168.786, 'duration': 5.842}, {'end': 1183.29, 'text': "So I'm going to go here and I'm going to just give the double quotes here and then just search for pre-launch task,", 'start': 1175.088, 'duration': 8.202}, {'end': 1189.112, 'text': 'which is going to build our code first, and then start the debugging right?', 'start': 1183.29, 'duration': 5.822}, {'end': 1191.872, 'text': 'And this is important for us.', 'start': 1189.292, 'duration': 2.58}, {'end': 1197.134, 'text': 'So just write the name of the task which you have created, which is inside your task.json.', 'start': 1192.193, 'duration': 4.941}, {'end': 1201.956, 'text': 'So inside the task.dation, the label of this task is echo.', 'start': 1197.734, 'duration': 4.222}, {'end': 1207.618, 'text': "So I'm going to just copy this label, whatever label you have defined here.", 'start': 1203.056, 'duration': 4.562}, {'end': 1214.54, 'text': 'You just need to copy this label and then you just need to add it in front of pre-launch task.', 'start': 1208.058, 'duration': 6.482}], 'summary': "Adding a pre-launch task called 'echo' to build and start debugging.", 'duration': 49.235, 'max_score': 1165.305, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY1165305.jpg'}], 'start': 965.427, 'title': 'C++ debugging in visual studio code', 'summary': 'Covers building, running, and debugging c++ code using visual studio code, setting up c++ gdb debugging, and discussing the pre-launch task for the debugger, providing a comprehensive guide with practical examples and configurations.', 'chapters': [{'end': 1046.14, 'start': 965.427, 'title': 'C++ build, run, and debug', 'summary': 'Covers building, running, and debugging c++ code using visual studio code, explaining the process of creating an output file, running the executable file, and the debugging option.', 'duration': 80.713, 'highlights': ["The chapter explains the process of creating an output file using the command 'g++-g main.cpp', resulting in the creation of the output file 'a.exe'.", "It details the process of running the executable file 'a.exe' by opening a new terminal and running the command, demonstrating the execution of the code without requiring a change in the directory.", 'The chapter introduces the debugging option in Visual Studio Code for C++ code, providing an overview of the debugging process.']}, {'end': 1164.905, 'start': 1046.22, 'title': 'Setting up c++ gdb debugging in vs code', 'summary': 'Explains the process of setting up c++ gdb debugging in vs code, including creating a launch.json file, specifying the debugging path, and utilizing mingw with gdb.', 'duration': 118.685, 'highlights': ['Creating a launch.json file inside the VS code directory by choosing the C++ GDB option, which is created to facilitate the debugging process.', 'Specifying the debugging path by navigating to the MinGW directory, selecting the bin directory, and copying the path up to bin followed by adding the gdb.exe file for debugging.', 'Choosing the C++ GDB option to facilitate the debugging process when working with MinGW, which is GDB.']}, {'end': 1214.54, 'start': 1165.305, 'title': 'Setting pre-launch task for debugger', 'summary': 'Discusses setting up a pre-launch task for the debugger by adding the task in the task.json file, which is important for building the code first and then starting the debugging process.', 'duration': 49.235, 'highlights': ['Setting a pre-launch task for the debugger by adding the task in the task.json file This is important for building the code first and then starting the debugging process', "Identifying and copying the label from the task.json file and adding it in front of pre-launch task The label of the task in task.json is 'echo'"]}], 'duration': 249.113, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY965427.jpg', 'highlights': ['The chapter provides a comprehensive guide with practical examples and configurations for building, running, and debugging C++ code using Visual Studio Code.', "It explains the process of creating an output file using the command 'g++-g main.cpp', resulting in the creation of the output file 'a.exe'.", "It details the process of running the executable file 'a.exe' by opening a new terminal and running the command, demonstrating the execution of the code without requiring a change in the directory.", 'The chapter introduces the debugging option in Visual Studio Code for C++ code, providing an overview of the debugging process.', 'Creating a launch.json file inside the VS code directory by choosing the C++ GDB option, which is created to facilitate the debugging process.', 'Setting a pre-launch task for the debugger by adding the task in the task.json file. This is important for building the code first and then starting the debugging process.', 'Specifying the debugging path by navigating to the MinGW directory, selecting the bin directory, and copying the path up to bin followed by adding the gdb.exe file for debugging.', 'Choosing the C++ GDB option to facilitate the debugging process when working with MinGW, which is GDB.', "Identifying and copying the label from the task.json file and adding it in front of pre-launch task. The label of the task in task.json is 'echo'."]}, {'end': 1415.49, 'segs': [{'end': 1268.487, 'src': 'embed', 'start': 1215.04, 'weight': 0, 'content': [{'end': 1222.243, 'text': "So it's going to run this build task first of all, and then it's going to start the debugging.", 'start': 1215.04, 'duration': 7.203}, {'end': 1232.994, 'text': 'and one more thing you need to do here is you just need to call your exe file, whatever exe file you want to debug,', 'start': 1222.423, 'duration': 10.571}, {'end': 1237.278, 'text': 'you just need to give the path to that exe file.', 'start': 1232.994, 'duration': 4.284}, {'end': 1246.762, 'text': 'so you just need to add dollar and then, in curly brackets workspace folder, backslash whatever is the exe name in your case.', 'start': 1237.278, 'duration': 9.484}, {'end': 1251.183, 'text': 'so in my case, the exe file name is a.exe.', 'start': 1246.762, 'duration': 4.421}, {'end': 1253.664, 'text': "so I'm just adding this one.", 'start': 1251.183, 'duration': 2.481}, {'end': 1258.485, 'text': 'otherwise, whatever is your exe file name, you just need to give the paths to that.', 'start': 1253.664, 'duration': 4.821}, {'end': 1268.487, 'text': "okay. So let's start the debugging once again, and I'm going to just press on this button, which is going to first of all execute the task.", 'start': 1258.485, 'duration': 10.002}], 'summary': 'Instruction on running build task, debugging, and calling exe file provided.', 'duration': 53.447, 'max_score': 1215.04, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY1215040.jpg'}, {'end': 1330.483, 'src': 'embed', 'start': 1306.64, 'weight': 4, 'content': [{'end': 1318.875, 'text': 'specially, you can just write system inside the brackets, you can just write pause and then you can just start debugging once again.', 'start': 1306.64, 'duration': 12.235}, {'end': 1328.142, 'text': 'just click on this debugging button and now you can see the execution has been stopped on this breakpoint we have set here.', 'start': 1319.515, 'duration': 8.627}, {'end': 1330.483, 'text': 'so when you want to go on the next line,', 'start': 1328.142, 'duration': 2.341}], 'summary': 'Instructions for debugging: set breakpoint, pause, and resume execution.', 'duration': 23.843, 'max_score': 1306.64, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY1306640.jpg'}, {'end': 1391.72, 'src': 'embed', 'start': 1362.872, 'weight': 3, 'content': [{'end': 1367.177, 'text': "And I'm going to add the breakpoint on these two variables once again.", 'start': 1362.872, 'duration': 4.305}, {'end': 1368.839, 'text': "And let's start the debugging again.", 'start': 1367.398, 'duration': 1.441}, {'end': 1371.682, 'text': "So I'm going to click on this button, which is going to start the debugging.", 'start': 1368.879, 'duration': 2.803}, {'end': 1376.728, 'text': "This is going to first build our program and then it's going to start the debugging.", 'start': 1371.702, 'duration': 5.026}, {'end': 1379.131, 'text': 'So first of all, it stops on this breakpoint.', 'start': 1376.968, 'duration': 2.163}, {'end': 1383.794, 'text': 'And you can see the labels are also assigned here.', 'start': 1379.731, 'duration': 4.063}, {'end': 1391.72, 'text': 'So first of all there is some garbage value assigned to x and y because there is nothing assigned here.', 'start': 1383.854, 'duration': 7.866}], 'summary': 'Debugging process starts, program builds, x and y have garbage values assigned.', 'duration': 28.848, 'max_score': 1362.872, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY1362872.jpg'}], 'start': 1215.04, 'title': 'Debugging c++ in visual studio code', 'summary': 'Focuses on debugging c++ programs in visual studio code, covering the configuration of the debugging process, task execution, setting breakpoints, stepping through the code, and variable inspection.', 'chapters': [{'end': 1268.487, 'start': 1215.04, 'title': 'Debugging process and task execution', 'summary': 'Discusses configuring the debugging process, including running a build task and specifying the exe file path, with emphasis on executing the task and starting the debugging process.', 'duration': 53.447, 'highlights': ['Executing the build task before starting the debugging process is essential for proper execution and debugging.', 'Specifying the path to the exe file using the workspace folder and the exe name is crucial for initiating the debugging process.', "The exe file, 'a.exe', is used as an example for specifying the path, emphasizing the need to provide the correct exe file path for debugging."]}, {'end': 1415.49, 'start': 1268.527, 'title': 'Debugging c++ in visual studio code', 'summary': 'Demonstrates how to debug c++ programs in visual studio code, including building the program, setting breakpoints, stepping through the code, and variable inspection.', 'duration': 146.963, 'highlights': ['The debugging process involves building the program and launching it, followed by setting breakpoints to pause execution and inspecting variables. (relevance: 5)', "To pause the window during debugging, the 'system' command with 'pause' can be used, allowing for easier inspection and debugging of the program. (relevance: 4)", 'The process of debugging includes setting breakpoints at specific lines, stepping over the code to inspect variable changes, and stopping the debugging process once done. (relevance: 3)', 'Demonstrates the step-by-step debugging process using an example of assigning values to variables, setting breakpoints, and inspecting variable changes during the debugging process. (relevance: 2)', 'Provides an overview of the debugging process for C++ in Visual Studio Code, concluding with a call to action for viewers to rate, comment, subscribe, and bid farewell. (relevance: 1)']}], 'duration': 200.45, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/DIw02CaEusY/pics/DIw02CaEusY1215040.jpg', 'highlights': ['Executing the build task before starting the debugging process is essential for proper execution and debugging.', 'Specifying the path to the exe file using the workspace folder and the exe name is crucial for initiating the debugging process.', "The exe file, 'a.exe', is used as an example for specifying the path, emphasizing the need to provide the correct exe file path for debugging.", 'The debugging process involves building the program and launching it, followed by setting breakpoints to pause execution and inspecting variables.', "To pause the window during debugging, the 'system' command with 'pause' can be used, allowing for easier inspection and debugging of the program.", 'The process of debugging includes setting breakpoints at specific lines, stepping over the code to inspect variable changes, and stopping the debugging process once done.']}], 'highlights': ['Visual Studio Code is highlighted as a free and open source tool for setting up the C++ development environment.', 'The chapter provides a comprehensive guide with practical examples and configurations for building, running, and debugging C++ code using Visual Studio Code.', 'The chapter provides step-by-step instructions for creating task.json and launch.json files for debugging in Visual Studio Code.', 'The chapter offers a detailed explanation of compilation commands and options, including specifying the command, args, and task group for building the program.', 'The debugging process involves building the program and launching it, followed by setting breakpoints to pause execution and inspecting variables.']}