I want to debug my sfml game for which I have created different classes in different files using VScode(On windows 11). Initially, I used the debugger without configuring launch.json file and while executing the game it wouldn't open the window and let me interact with it so that I may find where the issue is. Even after configuring the launch.json file I can't interact with the game and the window doesn't open. The launch.json file is as :
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug SFML Game",
"type": "cppdbg",
"request": "launch",
"program": "Executable file path", // The path is updated in the original file
"args": [], // Optional command line arguments
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"windows": {
"MIMode": "gdb"
},
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "sh",
"pipeArgs": ["-c"],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/mnt/c": "C:/"
}
}
]
}