Envriment:

win7,

lastest vscode,

TDMGCC,

Debug Step:

1. Press 'F5', will let you choice a item, as bellow:

Debug TDMGCC with VSCODE in win7

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:

Debug TDMGCC with VSCODE in win7

3.Press "F5" again, now you can debug it.

Note:  You must add "-g" as the GCC compile parameter. 

 

 

相关文章: