Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99653

Can someone explain how does VScode's Intellisense function? I am trying to build and run a c++ file on Vs code studio

$
0
0

I configured the Task.json file .

Here is my task.json file. (before running the task) I created 2 tasks, one for building the CPP file and another for simply running it on the terminal.

 {
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
    {
    "label": "run",
    "type": "shell",
    "command": "c:/Users/anime/OneDrive/Documents/countbrac/animesh.exe"
    },
    {
    "label": "Build",
    "type": "shell",
    "command": "g++",
    "args": [
    "main.cpp",
    "-o",
    "animesh"
    ],
    "dependsOn": [
    "run"
    ]
    },

    ]
    }

After Running the Task.json file, my task.json file had some alterations(i didn't it, most probably IntelliSense xd). Out of nowhere, My task.json had a new task with the label: shell.

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "run",
"type": "shell",
"command": "c:/Users/anime/OneDrive/Documents/countbrac/animesh.exe"
},
{
"label": "Build",
"type": "shell",
"command": "g++",
"args": [
"main.cpp",
"-o",
"animesh"
],
"dependsOn": [
"run"
]
},
{
"type": "shell",
"label": "cpp.exe build active file",
"command": "C:\\MinGW\\bin\\cpp.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:\\MinGW\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
}

So asking why my task.json file was altered, what for? it seems the third task is for building the CPP file but I have already made a task for that then why a new one?


Viewing all articles
Browse latest Browse all 99653


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>