I ran into a problem while debugging a C program in visual studio code, namely when I get to the closing curly brace int main(int argc, char** argv) further pressing the F10 key does not end debugging as it used to, but opens an empty crtexe.c file in this path C: > M > mingw-w64-crt-git > src > mingw-w64 > mingw-w64-crt > crt > crtexe.c
This is my simple C code program
#include <stdio.h>
int main(int argc, char** argv)
{
int first, second, temp;
printf("Enter first number: ");
scanf("%d", &first);
printf("Enter second number: ");
scanf("%d", &second);
// value of first is assigned to temp
temp = first;
// value of second is assigned to first
first = second;
// value of temp (initial value of first) is assigned to second
second = temp;
// %.2lf displays number up to 2 decimal points
printf("\nAfter swapping, first number = %d\n", first);
printf("After swapping, second number = %d\n", second);
return 0;
}
My launch.json file
{
"version": "0.2.0",
"configurations": [
{
"name": "C/C++: g++ build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\a.out",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++ build active file"
},
{
"name": "(Windows) launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/a.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"console": "externalTerminal"
}
]
}
How can I fix this so that after the last curly brace, my debugging automatically ends? P.S. of installed plugins I have: C/C++(Microsoft), C/C++ Extension Pack(Microsoft), C/C++ Themes, CMake, Cmake Tools, Code Runner.