iT邦幫忙

1

在 Visual Studio Code 建構 MinGW C/C++ 開發環境 (3) - 撰寫與偵錯

Joe 2020-03-11 03:03:00372 瀏覽

新增 HelloWorld.cpp:
https://ithelp.ithome.com.tw/upload/images/20200311/201103347s3XzFPyf3.png
https://ithelp.ithome.com.tw/upload/images/20200311/201103345roFjPGNcF.png
新增 tasks.json:
https://ithelp.ithome.com.tw/upload/images/20200311/20110334g5zTJmXthI.png
https://ithelp.ithome.com.tw/upload/images/20200311/20110334jyQEYjgBou.png
https://ithelp.ithome.com.tw/upload/images/20200311/20110334BjKYX9eB3t.png
新增 launch.json:
https://ithelp.ithome.com.tw/upload/images/20200311/20110334vb1Dczmkvq.pnghttps://ithelp.ithome.com.tw/upload/images/20200311/20110334W3f7gwH6fJ.pnghttps://ithelp.ithome.com.tw/upload/images/20200311/20110334uM7gNEzJnL.pnghttps://ithelp.ithome.com.tw/upload/images/20200311/2011033426lZXARWqx.png
新增 c_cpp_properties.json:
https://ithelp.ithome.com.tw/upload/images/20200311/20110334zfOHfk0UtS.png
https://ithelp.ithome.com.tw/upload/images/20200311/20110334PiWBoZLKLF.png
https://ithelp.ithome.com.tw/upload/images/20200311/20110334mtquCBgQSd.png
https://ithelp.ithome.com.tw/upload/images/20200311/20110334XF9hC0xdhl.png
https://ithelp.ithome.com.tw/upload/images/20200311/20110334yKcKMgtEI5.png
建置及偵錯:
https://ithelp.ithome.com.tw/upload/images/20200311/20110334RcpxD8k17n.png


1 則留言

0
hda8821791
iT邦新手 5 級 ‧ 2020-05-02 19:19:28

https://ithelp.ithome.com.tw/upload/images/20200502/2012680045MwgFqWFM.png

{
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:/MinGW/bin/gdb.exe",
"setupCommands": [
{
"description": "啟用 gdb 的美化顯示",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "g++.exe build active file"
}
]
}

我要留言

立即登入留言