-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Description
Type: Bug
C:\mingw64\bin\g++.exe -g -Wall -std=c++17 F:\ProgramsLearning\cplusplus\Cprg\01\6.5_switch\switch_fallthrough.c -o F:\ProgramsLearning\cplusplus\Cprg\01\6.5_switch\switch_fallthrough.exe &&F:\ProgramsLearning\cplusplus\Cprg\01\6.5_switch\switch_fallthrough.exe
F:\ProgramsLearning\cplusplus\Cprg\01\6.5_switch\switch_fallthrough.c
F:\ProgramsLearning\cplusplus\Cprg\01.vscode\tasks.json
After completing the compilation, while executing the switch_fallthrough.exe file with the above command inside the vscode terminal window, the vscode not responding with user input. But if any other program does not have user input , the with above command, vscode executing nicely. Please take a look into why vscode is not executing properly when the program require user input with above command. I have copied the task.json file.
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\mingw64\bin\g++.exe" ,
"args": [
"-g", "-Wall", "-std=c++17", "${file}",
"-o", "${fileDirname}\${fileBasenameNoExtension}.exe",
"&&${fileDirname}\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
#include <stdio.h>
int main() {
printf("Enter a character: ");
int c = getc(stdin);
printf("\n");
switch(c) {
case 'a':
puts("Stuff for a");
case 'b':
puts("Stuff for b");
break;
default:
puts("Stuff for everything else");
break;
}
return 0;
}
VS Code version: Code 1.76.2 (ee2b180, 2023-03-14T17:55:54.936Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: Yes
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 x 3600) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: unavailable_off vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 15.96GB (3.68GB free) |
| Process Argv | --crash-reporter-id e102166b-87b4-46d6-95f3-fde81d557d71 |
| Screen Reader | no |
| VM | 0% |
Extensions (33)
| Extension | Author (truncated) | Version |
|---|---|---|
| lua-debug | act | 1.61.0 |
| defold-ide | dap | 0.1.0 |
| vscode-glsllint | dto | 1.8.0 |
| code-runner | for | 0.12.0 |
| vscode-lua | gcc | 0.1.2 |
| vscode-gnu-global | jay | 0.3.5 |
| better-cpp-syntax | jef | 1.17.2 |
| Lua | key | 0.0.9 |
| vscode-lua-format | Koi | 1.3.8 |
| defold-lua-extension-pack | mik | 0.9.6 |
| vscode-defold-ide | mik | 0.9.3 |
| csharp | ms- | 1.25.4 |
| dotnet-interactive-vscode | ms- | 1.0.4172010 |
| vscode-dotnet-pack | ms- | 1.0.12 |
| vscode-dotnet-runtime | ms- | 1.6.0 |
| jupyter | ms- | 2023.2.1200692131 |
| jupyter-keymap | ms- | 1.1.0 |
| jupyter-renderers | ms- | 1.0.15 |
| vscode-jupyter-cell-tags | ms- | 0.1.8 |
| vscode-jupyter-slideshow | ms- | 0.1.5 |
| cmake-tools | ms- | 1.13.45 |
| cpptools | ms- | 1.15.1 |
| cpptools-extension-pack | ms- | 1.3.0 |
| lualint | sat | 0.0.5 |
| defold-vsc-snippets | sel | 1.3.7 |
| shader | sle | 1.1.5 |
| lua | sum | 3.6.18 |
| textproto-grammer | the | 0.0.8 |
| vscode-lua | tri | 0.12.4 |
| defold-vscode-build | ts- | 0.1.6 |
| cmake | twx | 0.0.17 |
| vscodeintellicode-completions | Vis | 1.0.21 |
| luahelper | yin | 0.2.21 |
(1 theme extensions excluded)
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
pyindex848:30662994
nodejswelcome1:30587005
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
vsctsb:30677850
azdwalk:30687957
pythonms35:30686772