I can't run my C programs on VS Code in an external Terminal. I use mac OS, I got installed C/C++ extension and code runner. Clicking F5, the terminal window pops up but the program doesn't run in it.
Here is a screenshot of how it looks like
Here are my .json settings:
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": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb"
}
]
}
settings.json
{
"files.associations": {
"__locale": "c"
}
}
tasks.json
{
// 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",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
}
]
}
Anyone has an idea on what should I change? Please help :(
question from:
https://stackoverflow.com/questions/65672000/cant-run-program-in-external-terminal-on-vs-code-on-mac-os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…