描述:再windows 10 下使用vscode进行C/C++编码和调试。
version:
sys:windows 10
vscode:VSCodeUserSetup-x64-1.35.1
mingw:x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0
1.安装vscode、mingw64
参考:https://www.cnblogs.com/TAMING/p/8560253.html
https://www.cnblogs.com/zhuzhenwei918/p/9057289.html
2.配置文件夹
如:
mkdir testdir && cd testdir && touch launch.json tasks.json c_cpp_propertie.json && touch codefile.c codefile.h
注意:task.json都是一样的,但是另两个配置文件涉及mingw的path若不一样是要修改的。
3.设断点调试
注意:一定要按照上述结构,并在vscode中先打开testdir,才能debug。(*.c file上侧有调试按钮)