1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| # launch.json { // 欲了解更多信息,请访问: https://code.visualstudio.com/docs/cpp/launch-json-reference "version": "0.2.0", "configurations": [ { "name": "clang + codelldb", // 对容器的支持弱于gdb "type": "lldb", "request": "launch", "program": "${workspaceRoot}/main", "args": [], "cwd": "${workspaceRoot}", "preLaunchTask": "clang++ build" }, { "name": "clang + cppdbg", // 混搭gdb和clang效果不好; 还是应该统一使用gnu或llvm "type": "cppdbg", "request": "launch", "program": "${workspaceRoot}/main", "args": [], "stopAtEntry": false, "cwd": "${workspaceRoot}", "environment": [], "externalConsole": false, "linux": { "MIMode": "gdb", "miDebuggerPath": "/usr/bin/gdb" }, "osx": { "MIMode": "lldb" }, "preLaunchTask": "clang++ build" }, { "name": "gcc + cppdbg", // gcc + gdb 效果最好 "type": "cppdbg", "request": "launch", "program": "${workspaceRoot}/main", "args": [], "stopAtEntry": false, "cwd": "${workspaceRoot}", "environment": [], "externalConsole": false, "linux": { "MIMode": "gdb", "miDebuggerPath": "/usr/bin/gdb" }, "osx": { "MIMode": "lldb" }, "setupCommands": [ { "description": "为 gdb 启用整齐打印", "text": "-enable-pretty-printing", "ignoreFailures": false } ], "preLaunchTask": "g++ build" } ] }
|