c++ debug not working when debugging the c++ extension #11877
Unanswered
wangzhankun
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I pressed F5 to debug the c++ extension, and in the loaded vscode I press F5 to debug C++ code. But it only run the tasks defined in
tasks.json, cannot launch the gdb to debug my c++ code.I can debug my c++ code in normal mode with c++ extension.
I didn't change any code of c++ extension, the tasks.json and launch.json in my c++ project is:
tasks.json
{ "tasks": [ { "type": "cppbuild", "label": "BuildAndDebug", "command": "make", "args": [ ], "options": { "cwd": "${workspaceFolder}" }, "problemMatcher": [ { "pattern": [ { "regexp": ".", "file": 1, "location": 2, "message": 3 } ], "background": { "activeOnStart": true, "beginsPattern": ".", "endsPattern": ".", } } ], "group": { "kind": "build", "isDefault": true }, "detail": "调试器生成的任务。", "isBackground": false, } ], "version": "2.0.0" }launch.json
{ // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "(gdb) 启动", "type": "cppdbg", "request": "launch", "program": "${workspaceRoot}/build/linux/x86_64/debug/c++", "args": [], "stopAtEntry": true, "cwd": "${fileDirname}", "environment": [], "externalConsole": false, "MIMode": "gdb", "setupCommands": [ { "description": "为 gdb 启用整齐打印", "text": "-enable-pretty-printing", "ignoreFailures": true }, { "description": "将反汇编风格设置为 Intel", "text": "-gdb-set disassembly-flavor intel", "ignoreFailures": true } ], "preLaunchTask": "BuildAndDebug" } ] }Beta Was this translation helpful? Give feedback.
All reactions