Envriment:
win7,
lastest vscode,
TDMGCC,
Debug Step:
1. Press 'F5', will let you choice a item, as bellow:
click the "c++ (GDB/LLDB)".
2.Then will be creat a file name "launch.json", open it and modify 2 place:
"program": "${workspaceFolder}/test.exe",
"miDebuggerPath": "C:\\TDM-GCC-64\\bin\\gdb.exe",
like following:
3.Press "F5" again, now you can debug it.
Note: You must add "-g" as the GCC compile parameter.