I've been writing c++ in vscode for two months now, and everything was working fine. Until last week this error showed up. (update: it showed up twice now) sometimes it's this error or a different error the program is the same as the one above^^ I was just trying to run the same program in a different file, and then a different error shows
{
// 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": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "C:\\msys64\\mingw64\\bin",
"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
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
}
]
}
launch.json
This program is for usaco bronze contest, and the same file runs find when I put it into the online grader. The whole situation is frustrating and I'm worried that the same error will show up again during future contests :(
Please help, any suggestions are appreciated. Thanks!
A few things I've tried:
- rename the file -> doesn't run
- copying the same program to a different file -> doesn't run
- using the same file but with a simple hello world -> runs
- writing a different code with the same function -> doesn't run??
- Attempted to uninstall vscode, but somehow I cannot uninstall it
- editing launch.json according to multiple solutions online, none of them worked
- Today the same error happened to a different program, and I couldn't find any similarities between the two.
And all the other programs I wrote before & after this error showed up all work. It seemed like it is very specific to these problem I'm trying to solve.