ubuntu vscode gdb 配置注意事項
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "(gdb) 啟動", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/build/build_linux32/test_v2x", "args": ["test_msg_digest_id","1"],//程序運行輸入的參數(shù)。 "stopAtEntry": false, "cwd": "${workspaceFolder}/build/build_linux32",#程序運行的目錄 // "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, "MIMode": "gdb", "additionalSOLibSearchPath":"${workspaceFolder}/build/build_linux32/lib", //庫的路徑 "setupCommands": [ { "description": "為 gdb 啟用整齊打印", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ] }
之前出現(xiàn)過調(diào)試進不了斷點,因為編譯時候CMAKE 編譯版本時Release,改成Debug 就可以了。
DCMAKE_BUILD_TYPE=Debug
*博客內(nèi)容為網(wǎng)友個人發(fā)布,僅代表博主個人觀點,如有侵權(quán)請聯(lián)系工作人員刪除。